Click here to Skip to main content
15,947,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Suppose that I have one SELECT that produce this,

Number   Person
   1     Mary,Cleveland, Supervisor
   2     John,Illinois, Programmer
   3     Victor, Albany,Engineer
   4     Melissa, Alaska, Chemical
   5     Tom, Honolulu, Vendor
   6     Sam, New Mexico, Programmer

and the other produces,

Number   PrivateInfo
   1     Start Date
   1     Start Date
   1     Start Date
   2     Salary
   2     Salary
   2     Salary

I need to add PrivateInfo to the first SELECT, but I cant because its giving a error that I cant use more than one select statement inside itself.

1 solution

Sounds like you're looking for a multi-table SELECT. Take a look at the JOIN keyword's syntax for your flavor of SQL.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900