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 inand 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.