all groups > sql server mseq > january 2006 >
You're in the

sql server mseq

group:

backup table to another table in database


backup table to another table in database Danne
1/17/2006 8:04:03 AM
sql server mseq:
I need to create a new table with the same columns using a select from
another table. I cannot find the syntax. Does anyone know if this can be
done in SQL 2k?
--
Re: backup table to another table in database Hugo Kornelis
1/17/2006 9:48:10 PM
[quoted text, click to view]

Hi Danne,

To copy the columns and the data at the same time (but not the
constraints, poroperties or indexes!!), use

SELECT Column1, Column2, ...
INTO NewTableName
FROM OldTableName
WHERE ....

--
AddThis Social Bookmark Button