背景:需要在数据库中批量更新一批数据,条件是某列包含中文字符。
sql语句:select * from table1 where 列名 like '%[吖-座]%'
拓展:
1.字段包含英文字符
select * from table1 where 列名 like '%[a-z]%'
2.字段包含纯数字
select * from table1 where 列名 like '%[0-9]%'
背景:需要在数据库中批量更新一批数据,条件是某列包含中文字符。
sql语句:select * from table1 where 列名 like '%[吖-座]%'
拓展:
1.字段包含英文字符
select * from table1 where 列名 like '%[a-z]%'
2.字段包含纯数字
select * from table1 where 列名 like '%[0-9]%'