I need to Export the details of sql table in Word document
-
Sunday, April 22, 2012 10:07 AM
need to export Table details to word in not the data in the table
Example
Column name Datatype Allow nulls
Stud name Varchar(20) Checked
Stud no Varchar(10) Checked
Rajsekar
All Replies
-
Sunday, April 22, 2012 11:25 AM
Hi Rasekar,
You can achieve this by right clicking your mouse on the table object you want to document in SQL Server Management Studio (SSMS) as follows; -
Select the text which documents the table design and cut and paste into Word. The desgin designs will then be displayed and stored in Word including formating.
Kind Regards,
Kieran.
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI,MCC, PGD SoftDev (Open), MBCS http://uk.linkedin.com/in/kieranpatrickwood
- Proposed As Answer by Papy NormandModerator Sunday, April 22, 2012 6:12 PM
- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Friday, May 04, 2012 3:45 AM
-
Thursday, April 26, 2012 9:02 AMcan I use TSQL instead of GUI ?
-
Thursday, April 26, 2012 9:11 AM
Hi Sakurai,
Following the above screen shot provided enables you to generate a T-SQL Table Create statement (design details) from the SSMS GUI. So the GUI and T-SQL are not mutually exclusive in this context.
Can you give me more details about what you require?
Kind Regards,
Kieran.
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI,MCC, PGD SoftDev (Open), MBCS http://uk.linkedin.com/in/kieranpatrickwood
-
Thursday, April 26, 2012 9:26 AMfor example I would like to make a schedule task to generate a table structure, I can't use GUI, I must use TSQL to generate.
-
Friday, April 27, 2012 11:53 AM
There is no programmatic way to reverse engineer CREATE TABLE.
Approximations:
1. sp_help
exec sp_help 'Production.ProductDocument' /* Column_name Type Computed Length Prec Scale Nullable TrimTrailingBlanks FixedLenNullInSource Collation ProductID int no 4 10 0 no (n/a) (n/a) NULL DocumentNode hierarchyid no 892 no (n/a) no NULL ModifiedDate datetime no 8 no (n/a) (n/a) NULL */
2. INFORMATION_SCHEMA views:
http://www.sqlusa.com/bestpractices2005/informationschema/
There are some scripts available on the web, no warranty though.
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012- Edited by Kalman TothMicrosoft Community Contributor Friday, April 27, 2012 11:54 AM
- Edited by Kalman TothMicrosoft Community Contributor Friday, April 27, 2012 11:55 AM
- Edited by Kalman TothMicrosoft Community Contributor Friday, April 27, 2012 3:59 PM
- Marked As Answer by Maggie LuoMicrosoft Contingent Staff, Moderator Friday, May 04, 2012 3:45 AM
- Edited by Kalman TothMicrosoft Community Contributor Wednesday, October 17, 2012 7:55 PM

