摘要:oracle 12g
VM設定:
=================================================
ifconfig第一行的ip
VM ip=192.168.216.128
vi /etc/hosts
sqlplus ora1/ora1
SQL>select * from tabs;
https://ouvpn-sg.oracle.com/prx/000/http/localhost/login
/crent
slq sytax:
查詢- => like '%\_%' escape '\'
ORACLE 12G 查詢結果為list
===========================================
select DEPARTMENT_ID,listagg(last_Name,';')
within group (order by last_name) as emp
from employees
group by DEPARTMENT_ID
tips:
not in => <> all
子查詢有null會查無任何資料,除非子查詢加is not null。
新增欄位後修改欄位順序的軟體
dbmb_redefinition
recusive CTW:避掉source->destin 又destin->source
==================================
with xxx (x,x2) as
()
cycle source,destin set is_cycle to'Y' default 'N'
select * from
2>
with xxx (x,x2) as
(
source != destin
)
--cycle source,destin set is_cycle to'Y' default 'N'
select * from
recovery時間點與scn
============================
get last scn(最後一次commit)
select dbms_flashback.get_system_change_number from dual
---convert timestam to scn
select timestamp_to_scan(systimestamp - interval '30' minute) from dual;