|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Table Creation TextI know how to get the text for various database objects (like stored
procedures) using sp_helptext or through direct access to the syscomments table. One thing I have not been able to find is the text associated with creating a table. Are programs that dynamically display create and alter text for tables in a database dynamically recreating the text based upon the names and existance of columns, defaults, triggers, etc. or is there a way to see the actual text used to create a table? Thanks in advance for any advice you might have! You could get CREATE TABLE script using Enterprise Manager's scripting
functionality. Show quote "Zachary Hartnett" <NoSpamPlease@NoThanks.no> wrote in message news:%23arqf%23RlFHA.3568@TK2MSFTNGP10.phx.gbl... >I know how to get the text for various database objects (like stored >procedures) using sp_helptext or through direct access to the syscomments >table. One thing I have not been able to find is the text associated with >creating a table. > > Are programs that dynamically display create and alter text for tables in > a database dynamically recreating the text based upon the names and > existance of columns, defaults, triggers, etc. or is there a way to see > the actual text used to create a table? > > Thanks in advance for any advice you might have! > Hi
Check out SQL-DMO in books online and the sample. This may also help http://www.nigelrivett.net/DMOScriptAllDatabases.html John Show quote "Zachary Hartnett" <NoSpamPlease@NoThanks.no> wrote in message news:%23arqf%23RlFHA.3568@TK2MSFTNGP10.phx.gbl... >I know how to get the text for various database objects (like stored >procedures) using sp_helptext or through direct access to the syscomments >table. One thing I have not been able to find is the text associated with >creating a table. > > Are programs that dynamically display create and alter text for tables in > a database dynamically recreating the text based upon the names and > existance of columns, defaults, triggers, etc. or is there a way to see > the actual text used to create a table? > > Thanks in advance for any advice you might have! > |
|||||||||||||||||||||||