This is miscategorized. It should be in the SQL forum with you other post.
I'm assuming this is here because you will wind up running the table generation script from C#. You will need to look in the system tables to identfy all of the constraints that are attached to the table. You will probably need dynamic SQL.
If it is a temp table, or merely for reference, the the constraints may be overkill. If you are doing this a script out for backup or custom "restore" process, then you will want the constraints.
Lodlaiden
A lack of experience doesn't prevent you from doing a good job.
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.