mysql - devide operation in sql -


i have database in table employee exist follow

+-----------+--------------+ | lastname  | departmentid | projectname +-----------+--------------+ | rafferty  |           31 |  ims | jones     |           33 |  ibm server | steinberg |           33 |  null | robinson  |           34 |  ims | smith     |           34 |  ibmserver | john      |         null |  ims +-----------+--------------+ 

i want retrieve last name work on project on jones working

select * employee ??? 

any suggestion please

following should query -

select * employee projectname = (select projectname employee lastname = 'jones'); 

we have not used in clause jones working in 1 project.

if working in multiple projects

then query can -

select * employee projectname in (select projectname employee lastname = 'jones'); 

thanks


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

python - cx_oracle unable to find Oracle Client -