+ Reply to Thread
Results 1 to 3 of 3

Thread: Table Modification

  1. #1

    Table Modification

    Hello , i have an old table that i want to add an identity column on , but the problem is that i can`t do it and to do that i have to drop table and i can`t do that as table has huge information on it , i though that i can make a new table and move data from the old table to the other , but it could take a very long time , so is there any easy way to do that ?

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    41
    You can use that query , it will add identity column to your table and starts from 1 and incrementing by 1.
    Code:
    alter table tablename add attributename INT IDENTITY

  3. #3
    Thanks a lot , it worked

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts