July 2010
Intermediate to advanced
840 pages
16h 33m
English
No two SQL products agree on the functions that should be available for use with <datetime> data types. In keeping with the practice of overloading functions, the SQL3 proposal has a function for extracting components from a datetime or interval value. The syntax looks like this:
<extract expression> ::=
EXTRACT (<extract field> FROM <extract source>)
<extract field> ::= <datetime field> | <time zone field>
<time zone field> ::= TIMEZONE_HOUR | TIMEZONE_MINUTE
<extract source> ::= <datetime value expression>
| <interval value expression>The interesting feature is that this function always returns a numeric value. For example, EXTRACT (MONTH FROM birthday) will be an INTEGER between 1 and 12. Vendors ...
Read now
Unlock full access