TSQL Scripting of Create Table 
Author Message
 TSQL Scripting of Create Table
Hi All,

Does anybody out there have a script that can be used to generate the
table definition in the same format as one would get using the Query
Analyzer's Script Object as 'Create'. I.e What TSQL statment can I use
to generate a CREATE TABLE statement.

TIA,

KOY

When I am right nobody remembers, when I am wrong everybody remembers
!!!

*** Sent via Developersdex http://www.***.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 08 Jul 2006 16:18:07 GMT
 TSQL Scripting of Create Table

There's no command or system stored proc that can do this. You will have you
use sp_OA* stored procedures, to instantiate SQL DMO objects, from your
T-SQL code. Here's one way of doing it:
http://vyaskn.tripod.com/code.htm#tblscript
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm


Hi All,

Does anybody out there have a script that can be used to generate the
table definition in the same format as one would get using the Query
Analyzer's Script Object as 'Create'. I.e What TSQL statment can I use
to generate a CREATE TABLE statement.

TIA,

KOY

When I am right nobody remembers, when I am wrong everybody remembers
!!!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 08 Jul 2006 19:07:32 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How can I script db from tsql script?

2. TSQL parameter creating table ?

3. CREATE TABLE AS, no no in TSQL?

4. creating SP from create table script

5. Creating New Tables from TSQL

6. Looking for Tool to create SQL tables (and scripts) from an Access table

7. Running script to create tables in a database via VB (SQLDMO)

8. Script to create table

9. Creating a database and tables from a script

10. Create Table in ActiveX Script

11. Create Table Script With Default Values

12. how to generate the script to create the tables with data


 
Powered by phpBB® Forum Software