How to take query for using this command [Resolved]

Posted by Jayakumars under Sql Server on 7/10/2015 | Points: 10 | Views : 1034 | Status : [Member] [MVP] | Replies : 1

I have take script written code like this

sp_helptext ProcedureName

but My Table name TblEmp

1.i need how to take TblEmp table script from query?
2. how to take records then generate insert query for this tblemp from query i dont need design part.

Mark as Answer if its helpful to you


Posted by: Bandi on: 7/10/2015 [Member] [MVP] Platinum | Points: 50


you can do it by query...

You can get it by using GUI..
In SSMS, Right-click on Table Name and then 'Script Table as' --> 'Create To' --> New Query Winsow / file/clipBorad

2. Right-click on Database --> Tasks --> Generate Scripts
another dialogue box opens --> Click on Next --> choose 'Select specific database objects' radio button --> Expand 'Tables' navigation --> Check the required table Name --> Click on 'Next ' button --> click on 'Advanced' button --> find out 'Types of data to script' option --> there choose 'Data only ' option to generate INSERT statements of exisitng table data

Mark This Response as Answer

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response