Chapter 4. Temporal Data Types in SQL

CLIFFORD SIMAK WROTE a science fiction novel entitled Time Is the Simplest Thing in 1977. He was wrong. And the problems did not start with the Y2K problems we had in 2000, either. The calendar is irregular, and the only standard unit of time is the second; years, months, weeks, hours, minutes, and so forth are not part of the metric system, but are mentioned in the ISO standards as conventions.

SQL-92 added temporal data to the language, acknowledging what was already in most SQL products by that time. The problem is that each vendor had made an internal trade-off. In Chapter 29, we will get into SQL code, but since this is an area where people do not have a good understanding, it is better to start with ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.