Prepare for your Next Interview
This is a discussion on how to alter normal column to identitycolumn within the SQL Server forums, part of the Databases category; I have existing table it has two columns one column datatyps is int i want to alter that int column to identity colum now i have datain that table how ...
|
|||
|
how to alter normal column to identitycolumn
I have existing table it has two columns one column datatyps is int
i want to alter that int column to identity colum now i have datain that table how this is possible to alter to identity column |
| Sponsored Links |
|
|||
|
Re: how to alter normal column to identitycolumn
There is no way to modify the identity property of a column through scripts.
You can try doing it from enterprise manager and generate the change scripts it follows the steps as below - create a tmp table with same design - transfer data to the tmp table from original table - drop the original table - create with new specs and - retransfer data with identity of - switch on the identity however do ensure that the column you want to change to identity has no nullls and duplicates Regards AM |
|
|||
|
Re: how to alter normal column to identitycolumn
just u go to the SqlEnterprisemanager-> and select the Database and one of the table(Ex:EmployeeTabel) select and modify u select the one colum and regradeing columns Details Populated in the footer and selected (select Deptno Column) and set one of option is Seed and give some number that's why we can change the exsting column constraint
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Normal View, Materialised View and Bitmap Index | Geek_Guest | Oracle | 3 | 05-27-2008 11:59 PM |
| What is the difference between Normal mode and Fast mode? | suneetham | QTP | 4 | 03-28-2008 02:25 AM |
| How to alter a type in SQL | Geek_Guest | SQL | 8 | 02-06-2008 02:51 AM |
| How to alter the primary column | lekhrajdeshmukh | SQL | 2 | 02-05-2008 07:07 AM |
| Restrictions with Alter command | fred | SQL | 3 | 09-03-2007 11:35 PM |