Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Create Table with T-SQL

By Vinay Kumar,

Hi friends,

This script will generate create table script for given tables.

First execute “CREATE OBJECTS SCRIPT” script for create a testing environment and then execute above script. This script will print the create table script. Now copy the script and execute it. And finally don’t forget execute the “DROP or CLEAR OBJECTS SCRIPT”, which is in the end of script.

I know most of people say that we can generate create table script through SSMS (Sql Server Management Studio) then why we go for this?

Frankly speaking, I have no answer for this. I just want to myself for learn some internal of sql and I learnt so much.

Here, I am just sharing this.

I hope this will help you. Your comments are most welcomed.

Keep Learning, Keep Growing!!!


Vinay Kumar

Total article views: 1658 | Views in the last 30 days: 7
Related Articles

URGENT: Error executing scripts......

URGENT: Error executing scripts......


Connditional executing of script

Connditional executing of script


Create Login Script

Error with Create Login Script


Execute SQL Script against Multiple Servers by PowerShell

Execute SQL Script against Multiple Servers by PowerShell


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones