mysql两列值互换及查找包含中文值的方法
查找列值中包含中文
select * from 表名 where not (列名 regexp ‘[\u0391-\uFFE5]’);
两列值互换
update 表名 as a, 表名 as b set a.字段A=b.字段B, a.字段B=b.字段A where a.主键id=b.主键ID【后面是其他条件】 and not (a.列名 regexp ‘[\u0391-\uFFE5]’);
查找列值中包含中文
select * from 表名 where not (列名 regexp ‘[\u0391-\uFFE5]’);
两列值互换
update 表名 as a, 表名 as b set a.字段A=b.字段B, a.字段B=b.字段A where a.主键id=b.主键ID【后面是其他条件】 and not (a.列名 regexp ‘[\u0391-\uFFE5]’);
2023-09-09 54
2023-06-13 254
2023-06-13 331
2023-06-12 262
2023-06-12 359
2016-10-27 3375
2021-02-10 1750
2018-04-06 4020
2017-04-02 9406 2
2017-10-03 6154
2016-01-28 2575 3
2016-01-02 2425 2
2017-04-02 9406 2
2015-10-01 2086 1
噢!评论已关闭。