Right click on the database, choose 'Generate SQL Script',
select the table you want, On the options tab choose 'CREATE', 'script indexes', 'primary keys and foreign keys'), select "Preview" and then copy and paste into Query Analyser or save the script as a file.
This will generate the table structure with the indexes but without having the data, just remember to change the table name in the script.
You can also use DTS but select objects which is the 3rd option and don't choose "copy data", change the default options to the PK, indexes, Fk etc and objects to your table, then save as package and then edit the table name again.
For VB you can either use the CREATE script or use VB to execute the DTS package.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.