Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 script index

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-11-04 : 06:49:20
A table in Dev has indexes.
When I create the script for the table, I do not see the indexes in the script whereas they are saved in the table.
How can I script the indexes as well as the create table...?
Thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-11-04 : 07:12:07



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-11-04 : 07:20:38
Can I do the script using right click on table name in management studio, script table as, create to, sql query analyser?
Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-04 : 07:46:50
you can do that.but that would not include the script for indexes. for scripting indexes you need to use generate scripts option available from databse ->tasks or open indexes folder within table and right and select script option

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2011-11-04 : 08:05:09
I see. thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-04 : 08:12:04
np

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -