设为首页 加入收藏

TOP

马上学会oracle----一(二)
2014-11-24 02:39:58 来源: 作者: 【 】 浏览:5
Tags:马上 学会 oracle----
%';
案例13 勒出职位中第二个字符是a的员工数据?
[sql]
select* from emp_xxx where job like'_a%';
案例14 查询 数据库中有多少个名字中包含EMP的表.oracle中的数据对大小写敏感
[sql]
select count(*) from user_tables where table_name like '%EMP%';
案例15 查询数据库中有多少个名字以''
[sql]
select count(*) from user_tables
where table_name like'H\_%'escape'\';
如果要查询的数据中有特殊字符,比如_或者%
在做模糊查询时需要加上\符号表示转义,并且用escape短语
指明转义字符'\';
案例16 is null 数据库语言判断null 的方法
查询哪些员工没有奖金。
[sql]
select * from emp_xxx
where bonus is null;
案例17 哪些员工有奖金?
[sql]
select * from emp_xxx
where bonus is not null;
案例18 not between 低值 and 高值
[sql]
select * from emp_xxx where salary not between 5000 and 8000;
案例19 不是部门20和部门30的员工。
[sql]
select * from emp_xxx where deptno not in(20,30);
//该问题还没有解决
//该问题已经解决
知识总结:
create 数据库对象的创建
alter 修改数据库对象
drop 删除数据库对象
truncate 清空表数据
insert 插入操作
update 更新操作
delete 删除操作
select 查询操作
commit 提交数据
savePoint 保存点
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇在Win7 sp1 64位下安装oracle10g .. 下一篇SO到订单行Closed

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: