标签:union 字母 regex cat 方案 -- 测试 nio create
生成测试数据
create view v as
select ename as data from emp where deptno=10 union all
select concat(ename,‘, $‘,sal,‘.00‘) as data from emp where deptno=20 union all
select concat(ename,deptno) as data from emp where deptno=30;
mysql> select * from v;
+----------+
| data |
+----------+
| CLARK |
| KING |
| MILLER |
| ALLEN30 |
| WARD30 |
| MARTIN30 |
| BLAKE30 |
| TURNER30 |
| JAMES30 |
+----------+
解决方案:
mysql> select data from v
where data regexp ‘[^0-9a-zA-Z]‘ = 0 ;
+----------+
| data |
+----------+
| CLARK |
| KING |
| MILLER |
| ALLEN30 |
| WARD30 |
| MARTIN30 |
| BLAKE30 |
| TURNER30 |
| JAMES30 |
+----------+
标签:union 字母 regex cat 方案 -- 测试 nio create
原文地址:http://www.cnblogs.com/liang545621/p/7518767.html