標籤:1.本機資料庫建立一個使用者test,並授予以下基本許可權(盡量不要多授權,如本地許可權大於遠程,會導致匯出失敗,鬱悶!):grant connect to test;grant resource to test;grant create table, create database link to test;grant create session to test;2.建立遠程dblinkcreate public database link linkname_xxx connect
標籤:oracle11g mybatis 批處理 1. 批處理 插入 很多時候都涉及到一系列資料的插入,通過mybatis的動態sql語句能夠很好的解決這個問題,當然,oracle已經提供了批插入的語句:insert into students select id,name ,email ,sdate from dual union select id,name ,email
標籤:--函數的建立create function func1(dno number)return NUMBER--必須帶有傳回值is v_max number;--定義傳回值 begin select max(sal) into v_max--賦值 from emp where deptno= dno; RETURN v_max;--返回 end;--函數的調用,只能是運算式的一部分,不能單獨調用 select * from emp where sal= func1
標籤:oracle 預存程序 迴圈表操作CREATE OR REPLACE PROCEDURE pubres_test asBEGIN for obj in ( select resource_name,unit_name,resource_code,sum(update_count) update_count from
標籤: create or replace trigger TRI_PrintTest before delete or insert or update on TEST_EXAM --觸發事件 for each row -- 每修改一行都需要調用此過程 begin dbms_output.put_line(:new.IDNEW); --IDNEW欄位更新後的值 dbms_output.put_line(:old.
標籤:LessonAimWhile retrieving data from the database, you may need to restrict the rows of data that are displayed or specify the order in which the rows are displayed. This lesson explains the SQL statements that youuse to perform these actions.