Loading ...
Sorry, an error occurred while loading the content.

Re: MUGH-SQLCON need help about the primary key...

Expand Messages
  • pankaj joshi
    Hello Shyam, Its not an good candidate for primary key as in multiuser scenario, it will not work if insert statement is fired concurrently . Regards Pankaj
    Message 1 of 4 , Dec 27, 2007
    • 0 Attachment
      Hello Shyam,

      Its not an good candidate for primary key as in multiuser scenario, it will not work if insert statement is fired concurrently .

      Regards
      Pankaj Joshi

      Shyam Sunder <shyam_k25@...> wrote:
      Hi All,

      DECLARE @TNumber bigint
      SET @TNumber=cast(datepart(yyyy,Getdate())as varchar(4))+ cast(datepart(mm,Getdate()) as varchar(2))+cast(datepart(dd,Getdate()) as varchar(2))+ cast(datepart(hh,getdate()) as varchar(2))+cast(datepart(mi,getdate()) as varchar(2))+cast(datepart(ss,getdate()) as varchar(2))
      PRINT @TNumber

      Please let me know can i use the above value as primary key.

      instead of auto number can i perfer using the above value..

      Please suggest me...

      Best Regards
      Shyam Sunder .K
      Database Administrator.
      98851 33956.

      __________________________________________________________
      Never miss a thing. Make Yahoo your home page.
      http://www.yahoo.com/r/hs

      [Non-text portions of this message have been removed]






      ---------------------------------
      5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.