SQL Server - Generate script without primary key -


i looking answer can't found it.

i'm trying make generated script of data (i mean, insert commands). because access permissions, can't set identity_insert table off , on (i'm using user application in staging)

so, there way make script in sql server manager , avoid field primary key? set false properties (primary, unique, etc), script still sending field (for e.g., recid 1, 2, 3, etc).

i'm using sql server 2012.

kind regards,

any solution (except remove notepad++) preciated. please ask/edit before downvoted, , sorry english :)

update: configuration script:

enter image description here

results get:

set identity_insert -table- on  insert table (id,field1) values (1,'value') 

a bit of work around, useful quick , dirty way of doing these things:

select 'insert table (field1) values (''' + field1 + ''')' table 

the result set row each insert statement every row in table table. insert statement generated concatenating insert statement text values in field1.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -