去除数据库中小数点后多余的0

  1. SELECT 0 + CAST(t.qty AS CHAR) FROM test t

跨表JOIN更新

  1. UPDATE T1, T2,
  2. [INNER JOIN | LEFT JOIN] T1 ON T1.C1 = T2. C1
  3. SET T1.C2 = T2.C2, T2.C3 = expr
  4. WHERE condition

去除字符串的

  1. SELECT TRIM(']' FROM TRIM('[' FROM '[12,3,1]'))

查询字符串是否包含指定字符

字符串中的字符默认分隔符为:, ,结果大于0,则包含指定字符

  1. SELECT FIND_IN_SET('2','12,3,1,1')