My database background has been mostly related to Oracle. These days, I am working as a freelancer with a company that heavily uses SQL Server. As a result, I miss knowing stuff out of my mind without having to search.
Today, I wanted to select from a table only those records that where created today. This table has a DateTime column that gets a default value from
Here is how I did it:
where DateDiff(DAY, MyDateColumn, GetDate()) = 0
Is there a better way?