更新多行的步驟:步驟多,但效率比較高: 1、create table 暫存資料表 value (select a.id,a.name,b.name,... from table1 a,table2 b where a.id=b.id) 2、刪除table1中的記錄,不要drop 3、insert into table1 select 你需要的欄位 from 暫存資料表。 select * from tb_ai03create table tb_ai031 as select * from
使用子查詢插入資料create table emp2(myid number(4),myname varchar2(50),mydept number(5));insert into emp2(myid,myname,mydept) select empno,ename,deptno from emp where deptno=10;使用子查詢更新資料(Oracle特有)希望員工Scott的崗位、工資、補助與Smith員工一致:update emp
create user hywin identified by hywin; 建立使用者password 使用者名稱 修改密碼alter user 使用者名稱 identified by 新密碼drop user 使用者名稱 [cascade]; 刪除使用者時,如使用者已經建立了表,那麼就需要在刪除時帶一個參數cascade。grant connect to 使用者名稱; 為某使用者名稱授串連資料庫的許可權。connect為一種角色。revoke select on emp from
Oracle 11.2命令列手工最簡建立資料庫的過程命令列手工最簡建立資料庫的過程環境:RHEL 5.4 x86 , oracle 11.21.設定環境變數在/home/oracle編輯# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programs# 11g R2export
ibm p570 db主機的TOP PROCESS中,竟有好多的ORACLE進程,不知是什麼原因,記憶體全部被吃完,cpu idle 為0,交換區幾乎被用完。哪個人,還是哪支程式有這麼強大嗎? 能把兩台小機都弄死了。 幾千個並發,確實強大。找下原因,原因不詳,因為中間重啟了DB。看:9:45 GMT+08:00 2011 to AIX Version 6the README file in /usr/lpp/bos for inov 24 15:59:45 GMT+08:00 2011
/u1/topprod/tiptop<topprod:/u1/topprod/tiptop> e p_zz\033[?7h\cProgram stopped at 'azz_p_go.4gl', line number 18.SQL statement error number -6372 (-12518).ORA-12518: TNS:listener could not hand off client
關於ORACLE中的數組:記錄同集合集合可以有三種實現方式:1 自訂一個TYPE使用VARRAY來得到一個數組但只能對基本類型定義如:CREATE TYPE 類型名 AS VARRAY OF VARCHAR2(20); 1 自訂一個TYPE使用VARRAY來得到一個數組但只能對基本類型定義如:CREATE TYPE 類型名 AS VARRAY(52) OF VARCHAR2(20); 不能使用如下:CREATE TYPE 類型名 AS VARRAY(52) OF