算術関数 ABS-絶対値abs(数値)
select m,abs (m) as abs_col from ;
mod--余を求める
mod(被残数、除数)
round--四捨五入round(オブジェクト、保持する小数の桁数)
文字列関数|--接合str 1‖str 2はmysqlでconcat(文字列、文字列、文字列)
length()--文字列の長さ lower()--小文字変換 upper()--大文字変換 replace(置換に使用する文字列、置換前の文字列、置換後の文字列)--文字列の置換 substring(切り取る文字列fromから始まる切り取りバイトfor切り取りバイト数)--文字列切り取り日付関数 current_date--現在の日付select current_date;
current_time--現在時刻select current_time;
current_timestamp--現在の日付と時刻select current_timestamp;
extract(日付要素from日付)--日付要素を切り取ります.
extract (year from current_timestamp) as year;
変換関数 cast(変換前の値as変換したいデータ型)--タイプ変換select cast('0001' as integer) as int_col; 結果は1
coalesce(データ1、データ2、データ3、...)--NULLを別の値に変換