i open one transaction and insert a row into table and close the ssms and reopen and check table but uncommitted transaction were in the resultset why this happen please tell me
Asked
Active
Viewed 67 times
-6
-
2Depends on what your data is. If you only ever expect one record per day, ever, then sure. But personally, I'd just stick with an int-based ID. – Siyual Nov 01 '16 at 12:31
-
Show us your table definition if you want an answer that is more than just a guess. Typically I do not like date columns for keys, but sometimes its the best option. – Neo Nov 01 '16 at 12:42
-
A quick google search turned up this http://stackoverflow.com/questions/2267326/how-to-choose-the-clustered-index-in-sql-server – Neo Nov 01 '16 at 12:45
1 Answers
0
date can be a good primary key for clustered index, but in general scenario, we don't link many tables (foreign key) using date.
i think it is depend on your er-diagram.

Alongkorn
- 3,968
- 1
- 24
- 41
-
no sir i am not connecting to any table i use date in where condition oftenly – ARJUN Nov 01 '16 at 12:48