Vikas
Vikas

Reputation: 5

Generate selected table DDL script

I have 100 tables in 6 schema. I want to create DDL (create table) script for 25 tables belong to all 6 schema. All are in one database.

I am new to SSMS (SQL Server 2018). I know its easy in Oracle. I am not getting a way how to get exact DDL only for some tables.

Can someone provide the script if handy?

Upvotes: 0

Views: 1735

Answers (1)

Robert Sievers
Robert Sievers

Reputation: 1353

Right click the database name in SSMS. Choose Tasks-> Generate Scripts. Click that you want to select only certain objects. Within the next dialog, there is an advanced button that allows you to script schema only, or schema and data both.

Upvotes: 1

Related Questions