Home > Archive > SQL server exams > February 2003 > Retrieve Table script





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Retrieve Table script
Buchi

2003-02-11, 10:27 am

How can I retrieve a Table definition like that of SP's or Views which can be retrieved by

sp_helptext <Obj_Name>

Please don't say me to use

sp_help <Table_Name> b'coz thats not going to fetch me what I want. I mean, I want the script of Table like

Create Table <Table_Name>
(
.......
.......
.......
)

Can anybody help me out please.
rcaine

2003-02-12, 6:26 am

Start SQL Enterprise Manager. Select your server, select Databases, select tables, then select your table. Right click on it then go to ALL TASKS. Select Generate SQL Script. You have a few check boxes but that should do what you want.
gcoliveira

2003-02-13, 8:07 am

rcaine is right. and you can select multiple objects into one script file...

[]s Giuliano
Buchi

2003-02-13, 8:11 am

Thanx rCaine ! But that is not what I want. I need some command or function or any other way which when executed through Query Analyzer or through any other front end application retrieves the Table script.
Hope U Iam clear in my requirement rCaine !
sjgross

2003-02-13, 12:14 pm

Hi,

If you go to this link:
http://www.experts-exchange.com/Dat...Q_11780398.html

You'll see where one of the SQL MVPs posted a script to do this.
gcoliveira

2003-02-13, 12:56 pm

WOW!

Pretty good link...
TKS, sjgross!

[]s Giuliano
Buchi

2003-02-14, 9:36 am

Thats great Sjgross ! Thanx a lot. The SP in the link specified looks like it would solve my requirement. I just have 2 test it.
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net