Home » Other » Training & Certification » select statement work for both insert and update
select statement work for both insert and update [message #327157] Sat, 14 June 2008 06:35 Go to next message
ruchika19840
Messages: 7
Registered: June 2008
Junior Member
SELECT *
FROM orders

You use this statement to retrieve data for ______

1) update
2) viewing
3) deleting
4) inserting
5) truncating


INSERT INTO suppliers
(supplier_id, supplier_name)
SELECT account_no, name
FROM customers
WHERE city = 'Newark';


UPDATE suppliers
SET supplier_name = ( SELECT customers.name
FROM customers
WHERE customers.customer_id = suppliers.supplier_id)
WHERE EXISTS
( SELECT customers.name
FROM customers
WHERE customers.customer_id = suppliers.supplier_id);




here also both insert and update will work then what is the
ans:2,4 or 1,2
Re: select statement work for both insert and update [message #327176 is a reply to message #327157] Sat, 14 June 2008 08:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow Posting Guidelines as stated in URL above


>here also both insert and update will work then what is the
>ans:2,4 or 1,2

How can any answer your question without having your data; which you decided NOT to post & share with us?
Re: select statement work for both insert and update [message #327183 is a reply to message #327157] Sat, 14 June 2008 10:01 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What do YOU think it is? Why?

Regards
Michel
Previous Topic: Subquery in clauses 'insert' and 'values'
Next Topic: process and methodologies for CMMI certification
Goto Forum:
  


Current Time: Thu Apr 25 22:19:59 CDT 2024