oracle實驗六楊豔華 軟體oracle實驗六

2021-10-13 12:21:37 字數 1024 閱讀 2919

實驗專案

使用游標、儲存過程和觸發器

課程名稱

oracle

資料庫成績時

間年月日

第周第節

地點e305姓名

李平學號班

級軟體班

一、實驗要求

在oracle 10g

中綜合運用

pl/sql

中各種程式控制結構、異常處理語句以及

dml語句序編寫實現游標、儲存過程和觸發器。

二、實驗目的

了解游標的概念和工作原理。

了解儲存過程的分類和使用方法。

了解觸發器的概念。

學習編寫和執行自定義過程。

學習建立和使用觸發器。

三、實驗環境

硬體裝置:

pc機一台

作業系統:

windows xp

應用工具:

oracle 10g

四、實驗內容及結果

建立游標

mycur

,從表employees

中讀取號部門的員工姓名,職務。並輸出「員工姓名:

***,職務:

***程式**如下:

set serveroutput on;

declare

varname varchar2(10);

vartitle v

archar2(10);

cursor mycur(varid number) is

select emp_name,title from lp_14.employees

where emp_id = varid;

begin

open mycur(20103);

fetch mycur into varname,vartitle;

close mycur;

dbms_output.put_line('

員工姓名

'|| varname||'

職務:'||vartitle);

end;

Oracle表的常用查詢實驗(六)

1.問題描述 為什麼第乙個sql有資料,第二個sql沒有資料?sql1 select t.from alx material types intf v t where t.material level 3 and t.material type not in select a.parent type...

oracle幾種關閉方式實驗

實驗記錄 實驗1 測試shutdown normal 1.首先我開啟了資料庫,沒做任何操作然後我關閉了資料庫 shutdown normal 無任何問題。2.開啟資料庫,連上 sys使用者,之後用客戶端 sqlplus 連上tom 使用者,關閉資料庫沒反應停留在 shutdown normal 之後...

oracle資料匯出匯入實驗

oracle資料庫 centos 6 一 在匯入主機上檢視oracle版本 su oracle sqlplus as sysdba select from v version 二 在匯出主機上檢視並 確認或建立 監聽 並測試 cat oracle home network admin tnsname...