Copy from one table into another
Database
3
Posts
3
Posters
0
Views
1
Watching
-
.NET- India wrote:
How to copy database design of a table into another table without copying its values
If you want to do this manually, you can do this through Management Studio by right-clicking a table and selecting 'Script Table As... -> CREATE TO'. If you want do do it in code, you could use SMO[^] to obtain metadata for a particular table and create another table based on this metadata.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
You could also
Select * into [NewTable] from [ExistingTable] where 1=0
SG Cause is effect concealed. Effect is cause revealed.