Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> What is the Purpose of Subquery in Insert?
This statement is found in oracle's training material:
INSERT INTO (SELECT employee_id, last_name
FROM employee WHERE department_id=50)
The above subquery is interpreted as the list columns to be inserted with values. But what is the point of having this syntax? And why bother putting in a WHERE clause? Isnt it good enough to list just the column names instead of a doing a subquery which is nothing more than indicating what columns are involved?? Received on Fri Feb 18 2005 - 02:44:39 CST