-
create or replace function 函數(shù)名(參數(shù),in 類型) as 定義變量查看全部
-
調(diào)用存儲過程: 1:exec 2:begin 過程名 注意:一般不在存儲過程,存儲函數(shù)中不做提交和回滾(他們能做) end;查看全部
-
存儲過程和存儲函數(shù)的區(qū)別:存儲過程無返回值,存儲函數(shù)有return查看全部
-
存儲過程和存儲函數(shù) 存儲過程和存儲函數(shù)相同點是:完成特定功能的程序。 區(qū)別:存儲函數(shù)能return語句返回值、存儲過程不能用return語句返回值查看全部
-
存儲過程,存儲函數(shù),也是數(shù)據(jù)庫對象查看全部
-
包體需要實現(xiàn)包頭中聲明的所有方法查看全部
-
in out 參數(shù)查看全部
-
一般不再存儲過程和存儲函數(shù)中commit和rollback查看全部
-
存儲過程只能刪除或替換 不能夠修改查看全部
-
注意輸入?yún)?shù)in 連接符“||”查看全部
-
存儲過程示例查看全部
-
存儲函數(shù)可以return語句返回值,而存儲過程不可以查看全部
-
數(shù)據(jù)對象: 表、視圖、索引、序列、同義詞、存儲過程、存儲函數(shù)等都屬于數(shù)據(jù)對象查看全部
-
1查看全部
-
create or replace procedure raisesalary(eno in number) as psal emp.sal%type; begin select sal into psal from emp where empno=eno; update emp set sal = sal+100 where empno=eno; --打印 dbms_output.put_line('漲前:'||psal||' 漲后:'||(psal+100)); end; / begin raisesalary(1); raisesalary(2); end; / select * from emp; ---查詢員工年收入 create or replace function queryempinfocome(eno in number) return number as psal emp.sal%type; begin select sal into psal from emp where empno=eno; return psal*12+10000; end; / -- out 參數(shù) 查詢 員工 和月薪 create or replace procedure queryeminform(eno in number,pname out varchar2,psal out number) as begin select name,sal into pname,psal from emp where empno=eno; end; /查看全部
舉報
0/150
提交
取消