1. Time
select curdate(), curtime(), month(birthday) from t_t;
select curdate(), curtime(), month(birthday) month from t_t;
2. Char
i. char_length
select userName, char_length(userName) from t_t;
ii. upper, lower
select userName, char_length(userName), upper(userName), lower(userName) from t_t;
3. Match Function
i. abs
select num, abs(num) from t_t;
ii. sqrt
select num, abs(num), sqrt(num) from t_t;
iii. mod
select num, abs(num), sqrt(num), mod(9,2) from t_t;
4. Cryptographic function
i. password
insert into t_t values(null, '2015-04-08', 'Aa', 1, password('123456'));
ii. md5
insert into t_t values(null, '2015-04-08', 'Aa', 1, md5('123456'));
iii. encode & decode
insert into t_t values(null, '2015-04-08', 'Aa', 1, md5('123456'), encode('abcd','aa'));
select pp, decode(pp,'aa') from t_t where id=7;