I am using SQL Server 2005.
I have a composite key comprising of these columns:
UserID ….. int
ADate ….. datetime
If I enter two similar dates with different time for a user, it is permitting that record. But I want it to restrict because of similar dates.
How to make it restrict when identical date parts are inserted?
Consider your table
You can add a COMPUTED column
So that you can create a UNIQUE constraint over it: