Tuesday, April 6, 2010

SQL insert,

If you like to insert value in SQL table based on a selected data set from another table, you can use the following syntax:

Insert into table1 (Col1, Col2, col3)
select Col1, Col2, col3 from table2 where Col1 > 'abcde'

No comments:

Post a Comment