Hi!
Take a look to the SQl Server help, System Stored procedures main help page, "Catalog Procedures". There are such as sp_columns, sp_tables, sp_pkeys etc. that seems what you asked for.
>Does anybody know what the best way of creating a new SQL Server table with indexes from the structure of an existing SQL Server table?
>
>I guess the commands would be similar to COPY STRUCTURE but using SQLEXEC(), but being a SQL novice, I am stuck.
>
>Any help would be gratefully appreciated.
>
>Justin.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.