Question about using a datetime column with an unique index

I was looking for duplicates in my table and grouped the rows by my datetime column. I thought this would only find rows that had the exact same date and time, down to the second. However, I learned this was not the case. It found duplicates for just the date. Here is what I used:


select dateAdded, uID, type, subject, message, count(*) as total from notifications group by uID, type, subject, message having total > 1 order by type;

How come this works fine and yet an unique index on the dateAdded column will only prevent duplicate inserts if the date and time are exact, down to the second?

Thanks!

nope

it found duplicates for the uID, type, subject, message column values

the dateAdded value it displayed was a random one from all the rows that had the same uID, type, subject, message