Search Postgresql Archives

Hint for a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have this tables


Table: Contact
IdContact
First Name
Second Name
… other columns

Table: Employee
IdEmployee
IdContact, related to Contact table
… other columns

Table: Salesman
IdSaleman
IdEmployee, if salesman is employee, related to Employee table
IdContact, if salesman is not an employee, related to Contact table


I need a query

Id Salesman - Second name - First name

But I can't figure how to do it, can someone can give advise?

Thanks




-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux