How to do "SET IDENTITY_INSERT" on MSSQL

31 views
Skip to first unread message

Pavel Polívka

unread,
Mar 2, 2012, 4:47:13 AM3/2/12
to not...@googlegroups.com
Hi,

is there any way how to use command "SET IDENTITY_INSERT table ON" prior to insert query?
I know it's not common thing, but I need to convert data from old database to new one and I need to have same Ids for rows and this command is the only way how to achieve this.

On other side, there can be more SET commands, which can be executed prior standard query.

Thanks.

Jakub Vrana

unread,
Dec 21, 2013, 10:12:36 AM12/21/13
to not...@googlegroups.com, Pavel Polívka
Hi,

You can use PDO directly.

Jakub
Reply all
Reply to author
Forward
0 new messages