November 5, 2008 at 2:49 am
hi ,
i have atble named emp which contains an index on empno and a constraint on address columns.
when i use the following query
select * into emp_copy from emp.
here i will get the data and structure of table.
how can i get the constraints and indexes along with the data and structure???
please help me
November 5, 2008 at 3:17 am
Hi,
Using Select into option, the indexes and constraints are ignored. Generate the script of the table by selecting options to include constraints, indexes (right click on tables--> all tasks--> Generate Script).
Run this script to create another table (emp2).
Insert into emp2
select * from emp
[font="Verdana"]Renuka__[/font]
November 5, 2008 at 8:08 am
i always use SSIS, just set CopySchema to true and select all the constraints, etc you want to copy over
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy