在開發環境中遇到這樣關於資料庫的問題有三個不同的查詢語句 1: select year_mon,sum(gasmon) from a where id='HBsRf0t6UI' and class=11 group by year_mon 2: select year_mon,sum(wellgasmon) from b where id='HBsRf0t6UI' and class=11 group by year_mon 3: select year_mon,sum(gasprodmon)
今天早上串連資料庫死活連不上了,報錯如下:ORA-01034:Oracle not availableORA-27101:shared memory realm does not exist 難道有人重啟伺服器了oracle還沒起來呢?連的伺服器上一看,已經起了半個多小時了。按說應該是起來了,在伺服器端用sqlplus "/ as sysdba" 命令也不能連上,看來執行個體也沒起來。
有兩種方式可以實現條件迴圈一、for 變數 in 開始數值...結束數值 loop end loop;二、while 條件 loop end loop;loop的使用方式:一、X := 100; LOOP X := X + 10; IF X > 1000 THEN EXIT; END IF END LOOP; Y := X;二、 X := 100; LOOP X := X + 10; EXIT
怎樣查看oracle當前的串連數呢?只需要用下面的SQL語句查詢一下就可以了。select * from v$session where username is not nullselect username,count(username) from v$session where username is not null group by username #查看不同使用者的串連數select count(*) from v$session #串連數Select count(*)
ROUND and TRUNC Date FunctionsTable 7-13 lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, 'DD', returns the date rounded or truncated to the day with
select * from dba_free_space ;--查看剩餘空間 select * from dba_data_files ;--查看錶空間資料檔案狀態Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->select b.file_id 檔案ID號,b.tablespace_name 資料表空間名,b.bytes 位元組數,(b.bytes-