Solved

How to get CREATE table script using TSQL

Posted on 2013-06-06
6
586 Views
Last Modified: 2013-07-02
I would like to get Create table scripts for given set of tables in my Database using TSQL. I know how to generate using SSMS > Table > Script table as > Create. But I would like to get the script using TSQL for an automated process. Please do assist.
0
Comment
Question by:Easwaran Paramasivam
  • 3
  • 2
6 Comments
 
LVL 10

Assisted Solution

by:rjanowsky
rjanowsky earned 500 total points
ID: 39228099
Have a look at this blog entry http://www.techrepublic.com/blog/datacenter/script-table-definitions-using-tsql/431. It might be of some help to you.
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39253629
The script that you shared is not readable. Could you please provide the script in readable format?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39254088
Why don't you contact Tim Chapman directly for the script?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 10

Expert Comment

by:rjanowsky
ID: 39255239
Sorry, but it's not my script. Please contact Tim and ask for the plain sql script.
0
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 0 total points
ID: 39280849
0
 
LVL 16

Author Closing Comment

by:Easwaran Paramasivam
ID: 39292521
Thanks.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to install/upgrade the Blitz responder kit 8 43
SQL query with cast 38 43
Webservices in T-SQL 3 31
Separate 2 comma delimited columns into separate rows 2 33
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question