标签:
select * from emp;
--查询ename中含有A的字母 select * from emp where ename like ‘%A%‘;
--查询ename中第一个字母是A的输出 select * from emp where ename like ‘A%‘;
--查询ename中末尾字母为S的输出 select * from emp where ename like ‘%S‘;
--查询ename中第2字母为A的输出 select * from emp where ename like ‘_A%‘;
--查询ename中第一个字母是A或C的输出 select * from emp where ename like ‘[A,C]%‘;
--查询ename中首字母不是A和C的输出 select * from emp where ename like ‘[^A,C]%‘;
--escape表示把 ‘\‘当成转移字符 select * from emp where ename like ‘%\%%‘ escape ‘\‘;
--查询ename中首字母不是A的输出 select * from emp where ename not like ‘A%‘;
标签:
原文地址:http://www.cnblogs.com/xuqiulin/p/4470612.html