Subrata Bauri (7/15/2011)
I will increment the value of this Column at the Time of Data Insertion in this CASE.
If you're doing an INSERT.. SELECT, or bulk-insert, all the rows will have the same insert date/time. Manually managing an incrementing column is a nightmare, seriously there are better things to spend a week or so on.
1. Easy to Count how many rows(Records) are there.
Primary key has no advantages there. Want to count rows - select count(*).
2. Easy to differentiate a row due this Entry No. (Suppose Others Rows have the Same Value).
Supposing I wanted something like that I could use a row_number or an identity without having to make it the primary key. With a staging table that I'm going to load, clean and truncate there are few advantages to bothering with a primary key at all.
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass