INSERT INTO mytable (id, col1, col2) VALUES (1,'a','b');
INSERT INTO mytable (id, col1, col2) VALUES (2,'c','d');
Code Snippet
select 'Insert into MyTable(Id,Col1,Col2) values (' + convert(varchar,ID) + ',''' + col1 + ''',''' + col2 + ''');'
from <MyTable>
|||If you are looking for a way to script INSERT statements for your data, look at this:http://vyaskn.tripod.com/code/generate_inserts.txt
Steve Kass
Drew University
http://www.stevekass.com
No comments:
Post a Comment