Friday, 17 August 2012

Query for Getting insert scripts of the Table's Data


Query for Getting insert scripts of the Table's Data



SELECT *, 'INSERT INTO db_name.[dbo].tbl_name VALUES('''+  CAST([column_1] AS VARCHAR)  + ''', '''+ CAST(column_2 AS VARCHAR)+ ''', '''+ CAST(column_3 AS VARCHAR)+ ''')' FROM db_name.[dbo].tbl_name

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home