Results 1 to 3 of 3

Thread: how to alter normal column to identitycolumn

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    9

    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


  2. #2
    Junior Member
    Join Date
    Oct 2007
    Answers
    3

    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


  3. #3
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact