练习了一下,
用时再慢慢看吧。
SHOW WARNINGS;
SELECT quote(text_fld) FROM string_tbl;
), 'n');
SELECT ASCII('ö');
SELECT LENGTH(char_fld) char_length FROM string_tbl;
SELECT POSITION('is' IN vchar_fld) FROM string_tbl;
) ));
SELECT MOD(10,4);
,) kilobyte, POW(,) megabyte, ,) gigabyte, POW(,) terabyte;
), ), );
SELECT account_id, SIGN(avail_balance), ABS(avail_balance) -> FROM account;
SELECT @@global.time_zone, @@session.time_zone;
SELECT CAST('2008-09-17 15:30:00' AS DATETIME);
SELECT CAST('2008-09-17' AS DATE) date_field, -> CAST('108:17:57' AS TIME) time_field;
SELECT CURRENT_DATE(), CURRENT_TIME(), CURRENT_TIMESTAMP();
DAY);
SELECT LAST_DAY('2008-09-17');
SELECT DAYNAME('2008-09-18');
SELECT EXTRACT(YEAR FROM '2008-09-18 22:19:05');
SELECT DATEDIFF('2009-09-03', '2009-06-24');
' AS SIGNED INTEGER);
SELECT CAST('999ABC111' AS UNSIGNED INTEGER);