-
查询客户id是105的客户信息
-
查询王姓的客户信息
-
查询英文姓名包括字符 a 的客户信息
-
查询身份证号码以110开头的客户信息
-
查询信用积分大于400的客户信息
-
查询上海的客户信息
-
查询所有女性的客户信息
-
查询信用积分小于300的男性客户信息
-
查询上海的女性客户信息
-
查询客户分布在哪些城市
-
查询长沙和深圳两地的客户信息
-
查询信用积分大于200小于400的客户信息
-
查询没有英文名的客户信息
-
查询姓名是两个字的客户信息
-
查询英文名不包含字符o的客户信息
-- 查询客户id是105的客户信息
select * from user where userid='105';
-- 查询王姓的客户信息
select * from user where name like '王%';
-- 查询英文姓名包括字符 a 的客户信息
select * from user where ename like '%a%';
-- 查询身份证号码以110开头的客户信息
select * from user where personID like '110%';
-- 查询信用积分大于400的客户信息
select * from user where credit>400;
-- 查询上海的客户信息
select* from user where city='上海';
-- 查询所有女性的客户信息
select *from user where sex='女';
-- 查询信用积分小于300的男性客户信息
select *from user where credit<300 and sex='男';
-- 查询上海的女性客户信息
select * from user where city='上海' and sex='女';
-- 查询客户分布在哪些城市
select city from user;
-- 查询长沙和深圳两地的客户信息
select * from user where city in ('长沙','深圳');
-- 查询信用积分大于200小于400的客户信息
select * from user where credit BETWEEN 200 and 400;
-- 查询没有英文名的客户信息
select * from user where ename is null;
-- 查询姓名是两个字的客户信息
select * from user where name like '__';
-- 查询英文名不包含字符o的客户信息
select * from user where ename not like '%o%';
-- 查询信用积分小于200大于400的客户信息
select * from user where credit not between 200 and 400;