谢敦华

 

2010年12月16日

oracle复习二

摘要: 1:给 scott.dept创建公有同义词syn_dept,使用同义词查询部门编码、部门名称和地点 创建公有同义词:create public synonym syn_dept for scott.dept 查询:select deptno,dname,loc from syn_dept2:创建序列seq_student,初始值是1000.增量为5,最大值为2000,循环,缓存为10个序列号 create sequence seq_student start with 1000 increment by 5 maxvalue 2000 cache 103:创建student表,字段名为sid 阅读全文

posted @ 2010-12-16 12:05 MichaelXDH 阅读(260) 评论(0) 推荐(0)

2010年12月9日

使用触发器记录操作

摘要: 创建表:create table student(sid int primary key,sname varchar(20))创建日志文件:create table log_student(logid int primary key,content varchar(20),updatedate date)创建序列号:create sequence seq start with 1 increment by 1 minvalue 1 maxvalue 10000000 nocycle cache 20;创建触发器:create or replace trigger tr_test before 阅读全文

posted @ 2010-12-09 11:38 MichaelXDH 阅读(191) 评论(0) 推荐(0)

2010年11月25日

游标

摘要: 3:使用显式游标,根据员工工资(sal)参数,查询员工表emp中工资大于等于该参数的员工信息,显示内容包括员工编码(empno),姓名(ename),工资(sal).用游标FOR循环来做。declare cursor s(sl number) is select empno,ename,sal from emp where sal>sl; empno emp.empno%type; en... 阅读全文

posted @ 2010-11-25 11:36 MichaelXDH 阅读(241) 评论(0) 推荐(0)

导航