Results 1 to 3 of 3

Thread: Unique IDs

  1. #1
    Join Date
    May 2004

    Unanswered: Unique IDs

    I've always used the identity field in SQL server to maintain the unique id for a table. With the new DB design at work we brought in a dba and she made us move away from allowing SQL maintain the unique field and having us maintain the unique field in code. To do that we had to begin a transaction, do a select max(id) + 1, insert into table, commit transaction. Doing it this way, I'm starting to see deadlocks due to the transactions locking the table.

    Getting down to what I wanted to know, what is the pro's/con's you guys see in maintaining the unique ID this way and is there a better way of creating an unique id in T-SQL code?


  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    The dba you brought in is an absolute freakin' idiot.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Jul 2003
    What's her reasoning? I'd like to see her explaination...
    That which does not kill me postpones the inevitable.

Posting Permissions

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