tst_client_info:
create table tst_client_info (
clientno varchar2(12),
clientno_name varchar2(50),
birth_date date,
sex varchar2(1),
id_type varchar2(1),
idno varchar2(30)
)
procedure plsql_procedure_1 (p_clientno in tst_client_info. clientno%type,
p_idno out tst_client_info .idno%type) is
cursor c_client_info(c_clientno tst_client_info.clientno%type) is
select idno from tst_client_info where clientno = c_clientno;
begin
open c_client_info(p_clientno),
fetch c_client_info
into p_idno;
close c_client_info;
end plssql_procedure_1;
procedure plsql_procedure_2 (p_clientno in tst_client_info,clientno%type,
p_idno out tst_client_info.idno%type) is
begin
select idno
into p_idno
from tst_client_info
where clientno = p_clientno;
end plsql_procedure_2;
如下函数功能是:
procedure plsql_procedure_3(p_clientno in tst_client_info,clientno%type,
p_idno out tst_client_info.idno%type) is
v_clientno tst_client_info.clientno%type;
cursor c_client_info is
select clientno from tst_client_info where idno = p_idno;
begin
open c_client_info;
loop
fetch c_client_info
into v_clientno;
exit when c_clinet_info%not found;
p_clientno(p_clientno.count) := v_clientno;
end loop;
close c_clinet_info;
end plsql_procedure_3;
http://tieba.baidu.com/p/4522584462
1, selct t2.* from t2 ,(select * from t3 where t3.按键号='E0001')A where t2=a.账单号
2, to_date('2017-10-11','yyyy-mm-dd')
3, select substr('12345',0,1) from dual; // 截取字符串的第一位 下标是重0开始 结果1
4, select concat('12','58') from dual
5, select NLS_UPPER('abcde') "test" from dual;
6,
select (case when aa.x1 is not null then aa.x1 else aa.x2 end ) de from ms_equipment aa
7,看第三就明白了 select ms_equipment.checkuse, ms_equipment.id ,(case ms_equipment.type_id when is not null then 88 else 8 end ) de from ms_equipment
8:太长了没时间看
很多问题度娘都能解决, 太简单了没人回答, 太复杂了又没人看, 所以多找度娘吧