歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 在Linux機器上安裝運行Oracle(下)

在Linux機器上安裝運行Oracle(下)

日期:2017/2/27 9:45:06   编辑:更多Linux
PL/SQL

  對SQL的過程性語言擴展(PL/SQL)可能是Oracle最著名的特點。這種強大的專業數據庫管理語言允許您對聲明性的SQL加邏輯控制。

  一般,PL/SQL的存儲過程(stored procedure)用命令行的sqlplus,圖形化的Developer/2000(Linux上目前還沒有)或其他工具開發,允許您從Oracle眾多的查詢接口(Oracle Application Server, Python, Perl,JDBC 或者C)訪問。

程序3:

create or replace package stored_sample as
function get_annual_salary (emp_number in number) return number;
end stored_sample;
/
create or replace package body stored_sample as
function get_annual_salary (emp_number in number) return number
is
annual_salary number;
monthly_salary number;
begin
select sal into monthly_salary from emp where empno = emp_number;
annual_salary := monthly_salary * 24;
return (annual_salary);
end get_annual_salary;
end stored_sample;
/

  上面的程序3是存儲進程的一個小示范,它接受一個員工號,返回該員工的年薪。相關的函數get_annual_salary封裝在PL/SQL包sample_package中。
更多內容請看Linux安裝 Linux安裝 linux系統安裝專題,或




Copyright © Linux教程網 All Rights Reserved