主要資料庫 IP :192.168.2.100 DB : RDBMS 11.2.0.4 oracle_sid : test global_name: test 從資料庫 IP :192.168.2.14 DB : RDBMS 11.2.0.4 oracle_sid : orcl global_name: orcl 1 為 test
建立資料表空間 create tablespace l_ldatafile 'D:luo.DBF'size 5mautoextend on next 4mmaxsize unlimited ; 建立使用者預設資料表空間 create user luo identified by 123456 default tablespace l_l ; 修改使用者預設空間 alter user luo default tablespace ts_hp; 修改密碼 alter
一個學習性任務:每個人有不同次數的成績,統計出每個人的最高成績。 這個問題應該還是相對簡單,其實就用彙總函式就好了。 select id,name,max(score) from Student group by id,name order by name 上邊這種情況只適用id 和name是一一對應的,否則查詢出來的資料是不正確的。 例如 : 1 張三 100 2 張三 90
create table t_dd_for_ccbprotocol( ID NUMBER(30) not null, ID_PERSON VARCHAR2(15) not null, CONTRACT_NBR VARCHAR2(30) not null, REQUEST_DATE DATE not null, CDATE DATE default sysdate, EDATE DATE default sysdate,
1插入一條資料(或者再刪除),浪費時間,有時幾百張表會累死的。 2建立資料庫之前 使用代碼: Sql代碼 alter system set deferred_segment_creation=false; 調整再建表 這兩種方都不好 下面是終極方法: 先查詢一下哪些表是空的: Sql代碼 select table_name from
本地安裝oracle instant client,下載,解壓,配置環境變數之後,執行sqlplus,報錯如下: [root@abc ~]# sqlplus sqlplus: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory [root@abc ~]# which sqlplus