Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rasmasyean
Starting Member
22 Posts |
Posted - 2009-07-05 : 08:38:14
|
Would this work? I know nowadays with cloud systems and multi-CPU loading, I would guess that there is a chance that the Date/Time Stamp might be duplicated for two records. Is this a correct assumption? Or is there some mechanism that prevents any two stamps on the same table from being duplicated? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-05 : 13:01:49
|
yup. datetime values can be same especially if your table is a target for bulk inserts |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2009-07-05 : 20:14:22
|
Why not just use an integer identity for a primary key?CODO ERGO SUM |
|
|
rasmasyean
Starting Member
22 Posts |
Posted - 2009-07-05 : 21:22:36
|
quote: Originally posted by Michael Valentine Jones Why not just use an integer identity for a primary key?CODO ERGO SUM
Is there an INSERT function that auto-generates an incremental number? |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-05 : 22:41:20
|
identity column will auto increment whenever records are inserted into the table. You don't and should not specify any value to it.try thiscreate table #test( [ID] integer identity, [Col] int)insert into #test ([Col]) select 100insert into #test ([Col]) select 200select * from #test KH[spoiler]Time is always against us[/spoiler] |
|
|
rasmasyean
Starting Member
22 Posts |
Posted - 2009-07-06 : 09:19:57
|
Is that "uniqueidentifier" in the design view? |
|
|
|
|
|