• subscribe
October 24, 2001 12:00 AM

Capturing the DDL from SQL Server 2000 Tables

SQL Server Pro
InstantDoc ID #22563

I want each row in a new table I'm developing to contain the Data Definition Language (DDL) of one of my existing SQL Server 2000 tables. Which system files do I need to manipulate to capture the DDL? I could use script generation to create this table manually, but I need a more automated process. I prefer to develop the table in T-SQL and not venture into SQL-DMO programming. Can you help?

You can rebuild the DDL without using SQL-DMO scripting by querying SQL Server's information schema views, which include TABLES and COLUMNS views and additional views for constraints and other objects. Note, however, that rebuilding the DDL without using SQL-DMO scripting isn't as easy as it first appears, so you might want to take a quick look at SQL-DMO again. It will make the rebuilding process a lot easier.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here