標籤:--建立資料表空間(一個資料表空間可以有多個使用者)--create tablespace demodatafile ‘D:\oracle\oradata\junchen\PLATFORM\demo.dbf‘size 50mautoextend on;--建立使用者,並且關聯資料表空間--create user demoidentified by dddefault tablespace demo;--給使用者指派許可權--grant connect,resource to
標籤:[[email protected] ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-OCT-2015 21:10:05 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))
標籤:[[email protected] ~]$ vi .bash_profile # .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi # User specific environment and startup programs PATH=$PATH:$HOME/bin
標籤:索引B_Tree結構 請參照 響應圖例索引是一種允許直接存取資料表中某一資料行的樹形結構,為了提高查詢效率而引入,是獨立於表的對象,可以存放在與表不同的資料表空間中。索引記錄中存有索引關鍵字和指向表中資料的指標(地址)對索引進行的I/O操作比對錶進行操作要少得多索引一旦被建立就將被oracle系統自動維護,查詢語句中不用指定使用哪一個索引ROWID:偽列,唯一標識一條資料記錄,可以理解為行記錄的地址select rownum,rowid,username from
標籤:any :如果是大於符號時( a > b ),那麼a中所有大於b中最小的那個數的值,就會被輸出出來。 如果是小於符號時( a < b ),那麼a中所有小於b中最大的那個數的值,就會被輸出出來。select * from t_hq_ryxx where gongz > any (select pingjgz from t_hq_bm); some:用法與any相同,只是any多用於非的環境中。 all:如果是大於符號時( a > b
標籤:PROCEDURE SP_AUTO_HOUR ISv_time varchar2(10);v_time1 varchar2(10);begin select to_char(sysdate-1/24,‘yyyymmddhh24‘) into v_time from dual; select to_char(sysdate,‘yyyymmddhh24‘) into v_time1 from dual; insert into test select * from test1 where
標籤: declare inst_name varchar2(100); cursor mycur is select * from tran_forward t where t.instrument_type_id=‘3010‘; query_row tran_forward%rowtype;begin open mycur; --開啟遊標 loop fetch mycur into query_row;
標籤:15,函數的建立,要求必須有傳回值,必須在語句中調用,需要多個傳回值時,使用out參數類型,在user_procedures表中查詢屬性,在user_source表中查詢原始碼,建立樣本:CREATE OR REPLACE FUNCTION my_function_01--建立函數(v_01 IN NUMBER)--參數列表RETURN NUMBER--傳回型別is--標識res NUMBER;--變數的聲明BEGIN--函數主體 res := v_01; RETURN