This is a discussion on Cloning a table within the SQL Server forums, part of the Microsoft SQL Server category; --> In my .NET code, with SQL Server 2000 as the backend, I need to create an exact copy, without ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| You can create a copy without constraints or indexes using SELECT ... INTO. Specify a WHERE clause to exclude data too: SELECT * INTO MyNewTable FROM MyTable WHERE 1 = 0 Note that the user will need CREATE TABLE permissions. This isn't the kind of thing one usually does in database applications though. -- Hope this helps. Dan Guzman SQL Server MVP "Michael Jackson" <michaeldjackson@cox.net> wrote in message news:%MsXd.6532$Wy.1516@okepread02... > In my .NET code, with SQL Server 2000 as the backend, I need to create an > exact copy, without data, of an existing table in the same database, that > the user selects from a combo box. Any ideas on how to do this? > |