select statement work for both insert and update [message #327157] |
Sat, 14 June 2008 06:35 |
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
|
|
|
|
|