</head>
Insertar valores en una Identity PK
Ya que estamos con el tema de las identities PK, aprovecho para hacer este post de ayuda memoria.
Para insertar valores en columnas Identity hay que hacer:
SET IDENTITY_INSERT ON [myTable] ON
y luego de hacer los inserts correspondientes apagar esto con
SET IDENTITY_INSERT ON [myTable] OFF
And happy coding!
Saludos!
| Print article | This entry was posted by Walter Poch on 08/26/2008 at 3:25 PM, and is filed under SQL. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |