Archives

You are currently viewing archive for 07 November 2007
Category: N800
Posted by: hajime osako
"# Add the Maemo Repositories to the Application Manager * Maemo Base o http://repository.maemo.org/ o bora o free non-free * Maemo Extras o http://repository.maemo.org/extras/ o bora o free non-free * Maemo Hackers o http://maemo-hackers.org/apt/ o bora o main"
rwhitby.net :: Setting up my Nokia N800
Category: Study
Posted by: hajime osako
Temporal Expressions

To perform interval arithmetic, use the INTERVAL keyword and a unit value:

SELECT '2007-12-31' + INTERVAL 10 DAY; (or INTERVAL 10 DAY + '2007-12-31')
SELECT '2007-12-31' - INTERVAL 10 DAY;

* Not DAYS.

The INTERVAL can be specified in units such as SECOND, MINUTE, HOUR, DAY, MONTH or YEAR.


NULL Values

Use of NULL values in arithmetic or comparison operations normally produces NULL results. Even comparing NULL to itself results in NULL.
The following statements return NULL:

SELECT NULL + 1, NULL < 1;
SELECT NULL = 1, NULL != NULL;
SELECT NULL LIKE '%', NULL LIKE NULL;

In MySQL, <=> operator works like = and this works with NULL operand.
NULL values sort together (ORDER BY), group together (GROUP BY), and are not distinct.
Expressions that cannot be evaluated (such as 1/0) produce NULL as a result, but the result NULL value cannot be inserted. This is controlled by ERROR_FOR_DIVISION_BY_ZERO mode.