Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 subquery

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2006-12-02 : 04:09:00

select idno,name,token from gworker where idno in(select idno from
oworker where wages>10000)

in oworker iam maintaining salary detail like wages,ot etc..i want to print oworker.wages also in above sql.how to do this??????

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2006-12-02 : 04:35:29
select g.idno, g.name, g.token, o.wages
from gworker g
inner join oworker o
on g.idno = o.idno


Duane.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-04 : 10:24:08

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -