sequence和procedure的动词区别

温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(2022)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_086064',
blogTitle:'Spring调用存储过程(StoredProcedure)',
blogAbstract:'存储过程名为get_seq:一个入参,三个出参一:基本的JDBC存储过程调用:private final String SEQUENCE_SQL = &&& \" {call get_seq(?,?,?,?)}\";public String getSequence() throws BasicException{&&& String result = \"\";&&& try {&&&&& Connection conn = dataSource.getConnection();&&&&& CallableStatement cmt =',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:1,
publishTime:4,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}From Wikipedia, the free encyclopedia
Sequence diagram of e-mail message sequence
A sequence diagram is an
that shows how objects operate with one another and in what order. It is a construct of a .
A sequence diagram shows object interactions arranged in time sequence. It depicts the objects and classes involved in the scenario and the sequence of messages exchanged between the objects needed to carry out the functionality of the scenario. Sequence diagrams are typically associated with use case realizations in the Logical View of the system under development. Sequence diagrams are sometimes called event diagrams or event scenarios.
A sequence diagram shows, as parallel vertical lines (lifelines), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner.
If the lifeline is that of an object, it demonstrates a role. Leaving the instance name blank can represent anonymous and unnamed instances.
Messages, written with horizontal
with the message name written above them, display interaction. Solid arrow heads represent synchronous calls,
represent , and dashed lines represent reply messages. If a caller sends a synchronous message, it must wait until the message is done, such as invoking a subroutine. If a caller sends an asynchronous message, it can continue processing and doesn’t have to wait for a response. Asynchronous calls are present in multithreaded applications, event-driven applications and in . Activation boxes, or -call boxes, are opaque rectangles drawn on top of lifelines to represent that processes are being performed in response to the message (ExecutionSpecifications in UML).
Objects calling methods on themselves use messages and add new activation boxes on top of any others to indicate a further level of . If an object is
(removed from ), an X is drawn on bottom of the lifeline, and the dashed line ceases to be drawn below it. It should be the result of a message, either from the object itself, or another.
A message sent from outside the diagram can be represented by a message originating from a filled-in circle (found message in UML) or from a border of the sequence diagram (gate in UML).
UML has introduced significant improvements to the capabilities of sequence diagrams. Most of these improvements are based on the idea of interaction fragments which represent smaller pieces of an enclosing interaction. Multiple interaction fragments are combined to create a variety of combined fragments, which are then used to model interactions that include parallelism, conditional branches, optional interactions.
OMG (2011). , p. 507.
OMG (2008). , p. 485.
OMG (2007). . p. 467.
Wikimedia Commons has media related to .
by Martin Fowler
by Scott W. Ambler.
by Yanic Inghelbrecht博客分类:
oracle存储过程
http://owftc.iteye.com/blog/90032
create or replace procedure GetRecords(name_out out varchar2,age_in in varchar2) as&&&
& select NAME into name_out from test where AGE = age_&&&
create or replace procedure insertRecord(UserID in varchar2, UserName in varchar2,UserAge in varchar2) is&&
& insert into test values (UserID, UserName, UserAge);&&
create or replace procedure GetRecords(name_out out varchar2,age_in in varchar2) as
& select NAME into name_out from test where AGE = age_
create or replace procedure insertRecord(UserID in varchar2, UserName in varchar2,UserAge in varchar2) is
begin
& insert into test values (UserID, UserName, UserAge);
首先,在Oracle中创建了一个名为TEST_SEQ的Sequence对象,SQL语句如下:
create sequence TEST_SEQ&&&
minvalue 100&&&
maxvalue 999&&&
start with 102&&&
increment by 1&&&
create sequence TEST_SEQ
minvalue 100
maxvalue 999
start with 102
increment by 1
语法应该是比较易懂的,最小最大值分别用minvalue,maxvalue表示,初始值是102(这个数字是动态变化的,我创建的时候设的是100,后因插入了2条数据后就自动增加了2),increment当然就是步长了。在PL/SQL中可以用test_seq.nextval访问下一个序列号,用test_seq.currval访问当前的序列号。
&&& 定义完了Sequence,接下来就是创建一个存储过程InsertRecordWithSequence:
--这次我修改了test表的定义,和前面的示例不同。其中,UserID是PK。
create or replace procedure InsertRecordWithSequence(UserID&& out number,UserName in varchar2,UserAge& in number)&&&
begin insert into test(id, name, age) --插入一条记录,PK值从Sequece获取&&&
values(test_seq.nextval, UserName, UserAge);&&&
/*返回PK值。注意Dual表的用法*/&&&
select test_seq.currval into UserID&&&&&&
end InsertRecordWithS&&
create or replace procedure InsertRecordWithSequence(UserID&& out number,UserName in varchar2,UserAge& in number)
begin insert into test(id, name, age) --插入一条记录,PK值从Sequece获取
values(test_seq.nextval, UserName, UserAge);
/*返回PK值。注意Dual表的用法*/
select test_seq.currval into UserID&&&
end InsertRecordWithS
为了让存储过程返回结果集,必须定义一个游标变量作为输出参数。这和Sql Server中有着很大的不同!并且还要用到Oracle中“包”(Package)的概念,似乎有点繁琐,但熟悉后也会觉得很方便。
关于“包”的概念,有很多内容可以参考,在此就不赘述了。首先,我创建了一个名为TestPackage的包,包头是这么定义的:
&&& create or replace package TestPackage is&&&
&&& type my -- 定义游标变量&&&
&&&& procedure GetRecords(ret_cursor out mycursor); -- 定义过程,用游标变量作为返回参数&&&
end TestP&&&&&
包体是这么定义的:&&&
create or replace package body TestPackage is&&&
/*过程体*/&&&
&&&&&&&&& procedure GetRecords(ret_cursor out mycursor) as&&&
&&&&&&&&& begin&&&
&&&&&&&&&&&&& open ret_cursor for select *&&&
&&&&&&&&& end GetR&&&
end TestP&&
&&& create or replace package TestPackage is
&&& type my -- 定义游标变量
&&&& procedure GetRecords(ret_cursor out mycursor); -- 定义过程,用游标变量作为返回参数
end TestP&&
包体是这么定义的:
create or replace package body TestPackage is
/*过程体*/
&&&&&&&&& procedure GetRecords(ret_cursor out mycursor) as
&&&&&&&&& begin
&&&&&&&&&&&&& open ret_cursor for select *
&&&&&&&&& end GetR
&&& 包是Oracle特有的概念,Sql Server中找不到相匹配的东西。在我看来,包有点像VC++的类,包头就是.h文件,包体就是.cpp文件。包头只负责定义,包体则负责具体实现。如果包返回多个游标,则DataReader会按照您向参数集合中添加它们的顺序来访问这些游标,而不是按照它们在过程中出现的顺序来访问。可使用DataReader的NextResult()方法前进到下一个游标。
create or replace package TestPackage is&&&
&&&& type my&&&
&&&& procedure UpdateRecords(id_in in number,newName in varchar2,newAge in number);&&&
&&&& procedure SelectRecords(ret_cursor out mycursor);&&&
&&&& procedure DeleteRecords(id_in in number);&&&
&&&& procedure InsertRecords(name_in in varchar2, age_in in number);&&&
end TestP&&
create or replace package TestPackage is
&&&& type my
&&&& procedure UpdateRecords(id_in in number,newName in varchar2,newAge in number);
&&&& procedure SelectRecords(ret_cursor out mycursor);
&&&& procedure DeleteRecords(id_in in number);
&&&& procedure InsertRecords(name_in in varchar2, age_in in number);
包体如下:
create or replace package body TestPackage is&&
&&& procedure UpdateRecords(id_in in number, newName in varchar2, newAge& in number) as&&
&&& begin&&
&&&& update test set age = newAge, name = newName where id = id_&&
&&& end UpdateR&&
&&& procedure SelectRecords(ret_cursor out mycursor) as&&
&&& begin&&
&&&&&& open ret_cursor for select *&&
&&& end SelectR&&
&&& procedure DeleteRecords(id_in in number) as&&
&&& begin&&
&&&&&& delete from test where id = id_&&
&&& end DeleteR&&
&&& procedure InsertRecords(name_in in varchar2, age_in in number) as&&
&&& begin&&
&&&&&& insert into test values (test_seq.nextval, name_in, age_in);&&&
--test_seq是一个已建的Sequence对象,请参照前面的示例&&&
end InsertR&&
&&& end TestP&&
create or replace package body TestPackage is
&&& procedure UpdateRecords(id_in in number, newName in varchar2, newAge& in number) as
&&& begin
&&&& update test set age = newAge, name = newName where id = id_
&&& end UpdateR
&&& procedure SelectRecords(ret_cursor out mycursor) as
&&& begin
&&&&&& open ret_cursor for select *
&&& end SelectR
&&& procedure DeleteRecords(id_in in number) as
&&& begin
&&&&&& delete from test where id = id_
&&& end DeleteR
&&& procedure InsertRecords(name_in in varchar2, age_in in number) as
&&& begin
&&&&&& insert into test values (test_seq.nextval, name_in, age_in);
--test_seq是一个已建的Sequence对象,请参照前面的示例
end InsertR
&&& end TestP
--------------------华丽的分割线-----------------------
http://oraclex.iteye.com/blog/814442
实现存储过程必须先在oracle建立相应的Procedures,如下所示:
--添加信息--&&
create or replace procedure insert_t_test(&&
p_id in number,&&
p_name in varchar2,&&
p_password in varchar2&&
insert into t_test(id,name,password) values(p_id,p_name,p_password);&&
-------------------------&&
--删除信息--&&
create or replace procedure del_t_test(&&
p_id&&&&&&&&&&&&&&&& in number,&&
x_out_record out number) is&
&&& delete t_test where id = p_&&
&&& x_out_record := 0;&&
exception&&
&&& when others then&
&&&&&&& x_out_record := -1;&&
-----------------------------&&
--查询所有信息--&&
create or replace procedure all_t_test(&&
x_out_record out number,&&
x_out_cursor out sys_refcursor) is&
&&& open x_out_cursor for&
&&&&&&& select * from t_&&
&&& x_out_record := 0;&&
exception&&
&&& when others then&
&&&&&&& x_out_record := -1;&&
--添加信息--
create or replace procedure insert_t_test(
p_id in number,
p_name in varchar2,
p_password in varchar2
) is
begin
insert into t_test(id,name,password) values(p_id,p_name,p_password);
-------------------------
--删除信息--
create or replace procedure del_t_test(
p_id&&&&&&&&&&&&&&&& in number,
x_out_record out number) is
begin
&&& delete t_test where id = p_
&&& x_out_record := 0;
exception
&&& when others then
&&&&&&& x_out_record := -1;
-----------------------------
--查询所有信息--
create or replace procedure all_t_test(
x_out_record out number,
x_out_cursor out sys_refcursor) is
begin
&&& open x_out_cursor for
&&&&&&& select * from t_
&&& x_out_record := 0;
exception
&&& when others then
&&&&&&& x_out_record := -1;
其中的存储过程名字(就是加粗部分)必须要和java代码中的相对应
Java代码如下:
Java代码&
package com.procedure.&&
import java.sql.CallableS&&
import java.sql.C&&
import java.sql.DriverM&&
import java.sql.ResultS&&
import java.sql.SQLE&&
import java.sql.T&&
import oracle.jdbc.OracleT&&
public class ConnDB {&&
& private String url="jdbc:oracle:thin:@localhost:1521:orcl";&&
& private String driverClass="oracle.jdbc.driver.OracleDriver";&&
& private String username="scott";&&
& private String password="hello";&&
& public&&& Connection getConn(){&&
&&& Connection conn=&&
&&& try {&&
&&&&& Class.forName(driverClass);&&
&&&&& conn=DriverManager.getConnection(url,username,password);&&
&&& } catch (ClassNotFoundException e) {&&
&&&&& e.printStackTrace();&&
&&& } catch (SQLException e) {&&
&&&&& e.printStackTrace();&&
& public static void main(String args[]){&&
&&& ConnDB cd=new ConnDB();&&
&&& Connection conn=cd.getConn();&&
&&&& * 添加 有输入参数&&& 无输出参数&
&&& /*try {&
&&&&& CallableStatement call=conn.prepareCall("{call insert_t_test(?,?,?)}");&
&&&&& call.setInt(1, 66);&
&&&&& call.setString(2, "小猫");&
&&&&& call.setString(3, "8989");&
&&&&& Boolean b=call.execute();&
&&&&& System.out.println("b="+b);&
&&& } catch (SQLException e) {&
&&&&& e.printStackTrace();&
&&&& * 删除 有输入参数&&& 得到输出参数&
&&& /*try {&
&&&&& CallableStatement&&& call=conn.prepareCall("{call del_t_test(?,?)}");&
&&&&& call.setInt(1, 66);&
&&&&& call.registerOutParameter(2, Types.INTEGER);&
&&&&& call.execute();&
&&&&& Integer result=call.getInt(2);&
&&&&& System.out.println("执行结果为0正常,执行结果为-1不正常"+result);&
&&& } catch (SQLException e) {&
&&&&& e.printStackTrace();&
&&&& * 使用游标查询所有信息 无输入参数 有输出参数&
&&& try {&&
&&&&& CallableStatement call=conn.prepareCall("{call all_t_test(?,?)}");&&
&&&&& call.registerOutParameter(1, Types.INTEGER);&&
&&&&& call.registerOutParameter(2, OracleTypes.CURSOR);&&
&&&&& call.execute();&&
&&&&& Integer result=call.getInt(1);&&
&&&&& ResultSet rs=(ResultSet) call.getObject(2);&&
&&&&& while(rs.next()){&&
&&&&&&& System.out.println(rs.getInt(1));&&
&&&&&&& System.out.println(rs.getString(2));&&
&&&&&&& System.out.println(rs.getString(3));&&
&&& } catch (SQLException e) {&&
&&&&& e.printStackTrace();&&
package com.procedure.
import java.sql.CallableS
import java.sql.C
import java.sql.DriverM
import java.sql.ResultS
import java.sql.SQLE
import java.sql.T
import oracle.jdbc.OracleT
public class ConnDB {
& private String url="jdbc:oracle:thin:@localhost:1521:orcl";
&
& private String driverClass="oracle.jdbc.driver.OracleDriver";
&
& private String username="scott";
&
& private String password="hello";
&
& public&&& Connection getConn(){
&&& Connection conn=
&&& try {
&&&&& Class.forName(driverClass);
&&&&& conn=DriverManager.getConnection(url,username,password);
&&& } catch (ClassNotFoundException e) {
&&&&& e.printStackTrace();
&&& } catch (SQLException e) {
&&&&& e.printStackTrace();
&&& }
&&&
& }
&
& public static void main(String args[]){
&&& ConnDB cd=new ConnDB();
&&& Connection conn=cd.getConn();
&&& /**
&&&& * 添加 有输入参数&&& 无输出参数
&&&& */
&&& /*try {
&&&&& CallableStatement call=conn.prepareCall("{call insert_t_test(?,?,?)}");
&&&&& call.setInt(1, 66);
&&&&& call.setString(2, "小猫");
&&&&& call.setString(3, "8989");
&&&&& Boolean b=call.execute();
&&&&& System.out.println("b="+b);
&&& } catch (SQLException e) {
&&&&& e.printStackTrace();
&&& }*/
&&&
&&& /**
&&&& * 删除 有输入参数&&& 得到输出参数
&&&& */
&&& /*try {
&&&&& CallableStatement&&& call=conn.prepareCall("{call del_t_test(?,?)}");
&&&&& call.setInt(1, 66);
&&&&& call.registerOutParameter(2, Types.INTEGER);
&&&&& call.execute();
&&&&& Integer result=call.getInt(2);
&&&&& System.out.println("执行结果为0正常,执行结果为-1不正常"+result);
&&& } catch (SQLException e) {
&&&&& e.printStackTrace();
&&& }*/
&&&
&&& /**
&&&& * 使用游标查询所有信息 无输入参数 有输出参数
&&&& */
&&& try {
&&&&& CallableStatement call=conn.prepareCall("{call all_t_test(?,?)}");
&&&&& call.registerOutParameter(1, Types.INTEGER);
&&&&& call.registerOutParameter(2, OracleTypes.CURSOR);
&&&&& call.execute();
&&&&& Integer result=call.getInt(1);
&&&&& ResultSet rs=(ResultSet) call.getObject(2);
&&&&& while(rs.next()){
&&&&&&& System.out.println(rs.getInt(1));
&&&&&&& System.out.println(rs.getString(2));
&&&&&&& System.out.println(rs.getString(3));
&&&&& }
&&& } catch (SQLException e) {
&&&&& e.printStackTrace();
&&& }
& }
}
-----------------------------------华丽的分割线------------------------
http://www.cnblogs.com/liliu/archive//2087546.html
Oracle 存储过程&&& 简要记录存储过程语法与Java程序的调用方式
  一 存储过程
    首先,我们建立一个简单的表进行存储过程的测试
create table xuesheng(id integer, xing_ming varchar2(25), yu_wen number, shu_xue number);insert into xuesheng values(1,'zhangsan',80,90)insert into xuesheng values(2,'lisi',85,87)
1)无返回值的存储过程
create or replace procedure xs_proc_no isbegin& insert into xuesheng values (3, 'wangwu', 90, 90);&end xs_proc_
2)有单个数据值返回的存储过程
create or replace procedure xs_proc(temp_name in varchar2,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& temp_num& out number) is& num_1& num_2begin& select yu_wen, shu_xue&&& into num_1, num_2&&& from xuesheng&& where xing_ming = temp_& --dbms_output.put_line(num_1 + num_2);& temp_num := num_1 + num_2;
其中,以上两种与sql server基本类似,而对于返回数据集时,上述方法则不能满足我们的要求。在Oracle中,一般使用ref cursor来返回数据集。示例代码如下:
3)有返回值的存储过程(列表返回)
首先,建立我们自己的包。并定义包中的一个自定义ref cursor
create or replace package mypackage as& type my_
在定义了ref cursor后,可以书写我们的程序代码
create or replace procedure xs_proc_list(shuxue&& in number,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& p_cursor out mypackage.my_cursor) isbegin& open p_cursor for&&& select * from xuesheng where shu_xue &end xs_proc_
二、程序调用
在本节中,我们使用java语言调用存储过程。其中,关键是使用CallableStatement这个对象,代码如下:
String oracleDriverName = "oracle.jdbc.driver.OracleDriver";
// 以下使用的Test就是Oracle里的表空间
String oracleUrlToConnect = "jdbc:oracle:thin:@127.0.0.1:1521:orcl";
Connection myConnection =
Class.forName(oracleDriverName);
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
myConnection = DriverManager.getConnection(oracleUrlToConnect,
"xxxx", "xxxx");//此处为数据库用户名与密码
} catch (Exception ex) {
ex.printStackTrace();
CallableStatement proc=
proc=myConnection.prepareCall("{call xs_proc(?,?)}");
proc.setString(1, "zhangsan");
proc.registerOutParameter(2, Types.NUMERIC);
proc.execute();
String teststring=proc.getString(2);
System.out.println(teststring);
} catch (Exception ex) {
ex.printStackTrace();
}
对于列表返回值的存储过程,在上述代码中做简单修改。如下
CallableStatement proc=&&&&&&&&&&& proc=myConnection.prepareCall("{call getdcsj(?,?,?,?,?)}");&&&&&&&&&&& proc.setString(1, strDate);&&&&&&&&&&& proc.setString(2, jzbh);&&&&&&&&&&& proc.registerOutParameter(3, Types.NUMERIC);&&&&&&&&&&& proc.registerOutParameter(4, OracleTypes.CURSOR);&&&&&&&&&&& proc.registerOutParameter(5, OracleTypes.CURSOR);&&&&&&&&&&& proc.execute();&&&&&&&&&&& ResultSet rs=&&&&&&&&&&& int total_number=proc.getInt(3);&&&&&&&&&&& rs=(ResultSet)proc.getObject(4);
上述存储过程修改完毕。另外,一个复杂的工程项目中的例子:查询一段数据中间隔不超过十分钟且连续超过100条的数据。即上述代码所调用的getdcsj存储过程
create or replace procedure getDcsj(var_flag&&&& in varchar2,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& var_jzbh&&&& in varchar2,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& number_total out number,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& var_cursor_a out mypackage.my_cursor,
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& var_cursor_b out mypackage.my_cursor) is
&
& cursor cur is
&&& select sj, flag
&&&&& from d_dcsj
&&&& where jzbh = var_jzbh
&&&& order by sj desc
&&&&&&
& last_
begin
& for cur1 in cur loop
&&& if last_time is null or cur1.sj &= last_time - 10 / 60 / 24 then
&&&&& update d_dcsj set flag = var_flag
&&&&& last_time := cur1.
&&& else
&&&&& select count(*) into total from d_dcsj where flag = var_
&&&&& dbms_output.put_line(total);
&&&&& if total & 100 then
&&&&&&& update d_dcsj set flag = null where flag = var_
&&&&&&& last_time :=
&&&&&&& update d_dcsj set flag = var_flag
&&&&& else
&&&&&&& open var_cursor_a for
&&&&&&&&& select *
&&&&&&&&&&& from d_dcsj
&&&&&&&&&& where flag = var_flag
&&&&&&&&&&&& and jzbh = var_jzbh
&&&&&&&&&&&& and zh = 'A'
&&&&&&&&&&
&&&&&&& number_total :=
&&&&&&& open var_cursor_b for
&&&&&&&&& select *
&&&&&&&&&&& from d_dcsj
&&&&&&&&&& where flag = var_flag
&&&&&&&&&&&& and jzbh = var_jzbh
&&&&&&&&&&&& and zh = 'B'
&&&&&&&&&&
&&&&&&& number_total :=
&&&&&&&
&&&&&
&&&
&
& select count(*) into total from d_dcsj where flag = var_
& dbms_output.put_line(total);
& if total & 100 then
&&& open var_cursor_a for
&&&&& select * from d_dcsj where zh = 'C';
&&& open var_cursor_b for
&&&&& select * from d_dcsj where zh = 'C';
& else
&&& open var_cursor_a for
&&&&& select *
&&&&&&& from d_dcsj
&&&&&& where flag = var_flag
&&&&&&&& and jzbh = var_jzbh
&&&&&&&& and zh = 'A'
&&&&&&
&&& number_total :=
&&& open var_cursor_b for
&&&&& select *
&&&&&&& from d_dcsj
&&&&&& where flag = var_flag
&&&&&&&& and jzbh = var_jzbh
&&&&&&&& and zh = 'B'
&&&&&&
&&& number_total :=
&
&
tongxt1986
浏览: 7622 次
来自: 合肥
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'}

我要回帖

更多关于 procedure的动词 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信