Inspite of so many years into db i still found i didnt knew this one :)
Aim: To write an insert after selecting from some other table.
SQL:
INSERT INTO A (column1, col2, col3)
SELECT otherCol1, otherCol2, otherCol3
From table
Where condition here
To Note: no use of the normal 'VALUES' kyword
Friday, February 17, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment