Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Queries Help
Hi Ranganath,
the query for ur first question is
update testtab t1 set t1.code = ( select t2.type from testtab t2 where t1.rowid = t2.rowid ) , t1.type= ( select t2.code from testtab t2 where t1.rowid = t2.rowid )
...will let u know if i can get a query for ur second question.
Regards,
Prem Khanna J.
On Thu, 30 Jan 2003 Krishnaswamy, Ranganath wrote :
>Hi List,
>
>I need the queries for the following requirements. Can anybody
>help me
>please?
>
>1. A table has two columns "Code" and "Type". Form a query to
>swap the
>values of these columns.
>
>2. A table contains empid, salary, mgr_id. Form a query to
>select the
>employees who have the salary more than their manager's salary.
>And if the
>mgr_id is null then that record should not be selected.
>
>Thanks and Regards,
>
>Ranganath
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: oraora oraora INET: oraoraora_at_rediffmail.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Jan 30 2003 - 01:38:45 CST
![]() |
![]() |