1、if 函数
IF(Condition,A,B) 当Condition为TRUE时,返回A;当Condition为FALSE时,返回B。
2、replace
REPLACE(str,from_str,to_str) 在字符串
str 中所有出现的字符串 from_str 均被 to_str替换,然后返回这个字符串
intoreplace into table
(id,name) values('1','aa') 如果id列为主键,表中不存在id为1的记录,则向表中插入记录,否则更新记录