March 2001
Intermediate to advanced
640 pages
14h 9m
English
The discussion about string inequalities got us started in understanding date comparisons. In fact, I avoided addressing dates at all until you understood inequalities. That's because almost all date processing on SQL Server is done with inequalities, not equalities.
SQL Server doesn't really store dates. It stores datetime data, which is a composite data type made up of date information and time information. There are two data types for storing dates: datetime and smalldatetime. Both types consist of a date component and a time component.
In Transact-SQL, all dates are quoted strings formatted as dates and/or times. (We'll look at some date functions tomorrow in the section "Using Functions.") The ...
Read now
Unlock full access