资源描述:
《oracle9i存储过程》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、oracle9i存储过程、触发器、函数简单实例(基于PL/SQL7.1)分类:DataBase2008-01-2411:03516人阅读评论(0)收藏举报第一:已经存在表PUB_T_DIVISION_TEST,可以使用以下的语句创建 createtablePUB_T_DIVISION_TEST( DIVID VARCHAR2(30)notnull, DIVNAME VARCHAR2(60)notnull, SUPERID VARCHAR2(30)notnull, DIVLVLI
2、D VARCHAR2(30)notnull, ENDFLAG VARCHAR2(30)notnull, ADDR VARCHAR2(30), POSTALCODE VARCHAR2(30), TEL VARCHAR2(30), DIVTYPE VARCHAR2(30), ISSELF VARCHAR2(30), BREVIARY VARCHAR2(30), DEFPASSWORDVARCHAR2(30), SHOWID VARC
3、HAR2(30), DISTRICTID VARCHAR2(30), ISXZQH VARCHAR2(30), ADMINMANID VARCHAR2(30) ) tablespaceEFMWEB pctfree10 initrans1 maxtrans255 storage ( initial64K minextents1 maxextentsunlimited );插入几条数据:insertintoPUB_T_DIVISION_TEST(DIVID,DIVNA
4、ME,SUPERID,DIVLVLID,ENDFLAG,ADDR,POSTALCODE,TEL,DIVTYPE,ISSELF,BREVIARY,DEFPASSWORD,SHOWID,DISTRICTID,ISXZQH,ADMINMANID)values('001','门头沟政府,'#','0001','0','','','','01','0','','','001','','','');insertintoPUB_T_DIVISION_TEST(DIVID,DIVNAME,SUPERID,DIVLVLID,
5、ENDFLAG,ADDR,POSTALCODE,TEL,DIVTYPE,ISSELF,BREVIARY,DEFPASSWORD,SHOWID,DISTRICTID,ISXZQH,ADMINMANID)values('087','街道预算','001','00010002','0','','','','01','0','','','087','','0','');insertintoPUB_T_DIVISION_TEST(DIVID,DIVNAME,SUPERID,DIVLVLID,ENDFLAG,ADDR,
6、POSTALCODE,TEL,DIVTYPE,ISSELF,BREVIARY,DEFPASSWORD,SHOWID,DISTRICTID,ISXZQH,ADMINMANID)values('087001','街道预算','087','000100020001','1','','','','01','0','','','087001','','0','');insertintoPUB_T_DIVISION_TEST(DIVID,DIVNAME,SUPERID,DIVLVLID,ENDFLAG,ADDR,POS
7、TALCODE,TEL,DIVTYPE,ISSELF,BREVIARY,DEFPASSWORD,SHOWID,DISTRICTID,ISXZQH,ADMINMANID)values('088','乡镇预算','001','00010003','0','','','','04','0','','','088','','','');insertintoPUB_T_DIVISION_TEST(DIVID,DIVNAME,SUPERID,DIVLVLID,ENDFLAG,ADDR,POSTALCODE,TEL,DI
8、VTYPE,ISSELF,BREVIARY,DEFPASSWORD,SHOWID,DISTRICTID,ISXZQH,ADMINMANID)values('088001','乡镇预算','088','000100030001','1','','','','01','0','','','088001','','0','');第二:使用PL/SQL连接上oracle,连接过程如下 1)安装过程略, 2