日常潜水-20160814-MySQL

MySQL / SQL 删除最后一个字段

  • update table set field = left(field, char_length(field)-1) where right(field,1) = ‘xx’;
  • update table set field = left(field, len(field)-1) where right(field,1) = ‘xx’;

你可能感兴趣的:(sql,mysql)