Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL script to generate DDL for all tables in a DB

Author  Topic 

HeliosRex
Starting Member

7 Posts

Posted - 2008-01-23 : 14:20:17
Hello guys,

I am trying to come up with a SQL script to generate DDL for all the tables (about 1500 of them) in my database by reading the system tables. I do not want to use the "Generate SQL Script" option from the Enterprise Manager, because I am only looking to generate table creation, Indexes, and Primary Keys. I DO NOT want to generate FK relationships.

My scripting is still work in progress, so I was wondering if any of you have it handy and wouldn't mind sharing with a fellow DBA.

Your help will be grately appreciated!

Regards,
HeliosRex
   

- Advertisement -