Groups | Blog | Home
all groups > sql server clients > january 2004 >

sql server clients : Select and Insert into....



Andrew J. Kelly
1/27/2004 9:06:57 AM
You need to specify each of the columns instead of using * and CAST the
Identity column to an int.

SELECT CAST(YourID AS INT) AS YourID, Col2... INTO NewEmp FROM emp


--
Andrew J. Kelly SQL MVP


[quoted text, click to view]

Noorali Issani
1/27/2004 6:20:52 PM
I have a question like I have one table name emp and I am going to copy that
table through the following command.

select * into empnew from emp

Now my question is that in the emp table there is a primary key with
identity ON but I wanna off that identity in my new table (empnew) how can I
do this ?

waiting for your reply

Noor

AddThis Social Bookmark Button