SQL> select tablespace_name,file_id,bytes/1024/1024,file_name from dba_data_files order by file_id; 6、顯示當前串連使用者 --------------------- SQL> show user 7、把SQL*Plus當計算機 ---------------------- SQL> select 100*20 from dual; 8、連接字串
在遊標FOR迴圈中使用查詢 在遊標FOR迴圈中可以定義查詢,由於沒有顯式聲明所以遊標沒有名字,記錄名通過遊標查詢來定義。 DECALRE v_tot_salary EMP.SALARY%TYPE; BEGIN FOR r_dept IN (SELECT deptno,dname FROM dept ORDER BY deptno) LOOP DBMS_OUTPUT.PUT_LINE('Department:'|| r_dept.deptno||'-'||r_dept.dname);
Oracle查表結構、屬主、所有表等語句 select * from dba_tables 查系統中所有表select * from all_tab_columns where table_name = 'TableName' and Owner = 'OwnerName' 查系統中某個具體表結構select * from tab where tabtype = 'TABLE' 查目前使用者下的所有表,tabtype可變select * from user_tables;
Remove auto-start from system boot:cd /etc/ls -l rc*.dYou may get 7 directories, rc0.d, rc1.d, ..., rc6.d and rcS.d, and in some of them you may find the files like ls -l *oracle-xe* lrwxrwxrwx 1 root root 19 Mar 17 23:59 K01oracle-xe ->
怎樣查看oracle當前的串連數呢?只需要用下面的SQL語句查詢一下就可以了。 select * from v$session where username is not null select username,count(username) from v$session where username is not null group by username #查看不同使用者的串連數 select count(*) from v$session #串連數 Select count(*)
在偶然一次執行Oracle 9i的left outer join查詢時,發現了一些匪夷所思的問題,在此貼出來和大家討論一下。先建立一些表和記錄來類比當時的情況:create table temp_test1( a number(10));INSERT INTO temp_test1 VALUES(1);INSERT INTO temp_test1 VALUES(2);INSERT INTO temp_test1 VALUES(3);INSERT INTO temp_test1