- 博客(14)
- 资源 (2)
- 收藏
- 关注
转载 Oracle用Start with...Connect By子句递归查询
Oracle用Start with...Connect By子句递归查询ORACLE 提供了一个有趣的功能 connect by子句,它可以对具有家族树结构的分枝进行排序。它的用途有机构或公司的各层结构,财务的科目代码等。要使用查询遍历,需要在将数据在基表中按照层次结构进行存储。比如一个组织机构就是这样的典型例子。实现语句:SELECT columnFROM t
2012-06-28 09:43:43 304
原创 创建单表视图
create view my_table_studentinfoasselect studentcode,studentnum,name,spell,idtype,idnum,studenttype,drivecartype,statusfrom my_table_gen_studentinfo where schoolcode = 'jx00000226'
2012-06-07 22:46:41 882 1
转载 把触发器说透
本篇主要内容如下:8.1 触发器类型8.1.1 DML触发器8.1.2 替代触发器8.1.3 系统触发器8.2 创建触发器8.2.1 触发器触发次序8.2.2 创建DML触发器8.2.3 创建替代(INSTEAD OF)触发器8.2.3 创建系统事件触发器8.2.4 系统触发器事件属性8.2.5 使用触发器谓词8.2.
2012-06-07 13:51:59 390
原创 触发器
1.创建对表的操作(增、删、改)进行记录的触发器create or replace trigger triggerListenterafter INSERT OR UPDATE OR DELETEon gen_studentinfo2for each rowbegin insert into gen_studentinfo3 ( STUDENT
2012-06-07 10:07:19 343
原创 创建唯一索引
create unique index gen_studentinfo2 on gen_studentinfo2(studentcode)
2012-06-06 22:51:20 413
原创 查询表中重复数据
select count(studentcode),studentcode from gen_studentinfo2 group by studentcode having count(studentcode) > 1 select * from people where peopleId in (select peopleId from people group by peop
2012-06-06 22:40:25 393
原创 查询表中重复数据
select count(studentcode),studentcode from gen_studentinfo2 group by studentcode having count(studentcode) > 1
2012-06-06 22:40:24 284
原创 快速创建与现有表相同结构的表
create table gen_studentinfo2 asselect * from gen_studentinfo
2012-06-06 22:28:25 526
原创 decode简单用法
selecta.deptcode,a.deptname,decode(substr(a.deptcode,0,2),'jx',(select c.schoolname from sch_schoolinfo c where c.schoolcode = a.deptcode),'dw',(select d.deptname from sys_deptinfo d where d.dep
2012-06-03 09:53:25 387
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人