Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-02-04 : 10:25:51
|
| Zellie writes "Does SQL Server 7 support insertion of data with Select? That is, Insert into destinationtable(fields) Select fields from sourcetable...If so, how? I created a table and then insert data to it by selecting values from another table but it didn't worked. Please help me how." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-02-04 : 10:28:13
|
| If the destination table already exists, then you've got the right syntax. However, if you want to create the destination table on the fly, then use SELECT...INTO:SELECT col1, col2, col3 INTO destTable FROM sourceTableSELECT...INTO can be a resource hog if you are selecting from a large source table, or have a lot of concurrent users running it (if it was in a stored procedure, for example). Just keep it in mind if performance seems to falter. |
 |
|
|
|
|
|