How to generate Create Table Script for multiple Tables in a Schema at one time?

Experts,

Is there a way for me to create CREATE TABLE Scripts for all of me existing tables within a single SCHEMA in my Database? Not one at a time, but I need a script that will generate CREATE TABLE SCRIPTS into a single SQL Script. I know that I can right-click and select Script Table as CREATE, but I want to be able to run a script that will list out all 20 tables in my SCHEMA all at once and all in one single deployment script.

I would like to be able to extract the DDL for multiple tables in a single schema so that I can communicate this create table information to my DBA so that they can create these tables in our PROD environment.

Thanks
LVL 17
MIKESoftware Solutions ConsultantAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
you  can choose multiple tables using the wizard


right click on your database -> Tasks -> generate scripts and choose " specific database objects"  then choose the tables you want to scripted out
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.