- null๊ฐ์ ๋ค๋ฅธ๊ฐ์ผ๋ก ๋ฐ๊พธ๋ ํจ์
nvl(null์ธ ์ปฌ๋ผ, ๋ฐ๊ฟ ๊ฐ) => nvl(์ปฌ๋ผ๋ช
, 0) == mysql์์๋ ifnull๊ณผ ๊ฐ์
- ํ
์ด๋ธ ์ญ์ ์, ํด์งํต์์ ์ญ์ ๋ ํ
์ด๋ธ ์กฐํ ๊ฐ๋ฅ
drop table ํ
์ด๋ธ๋ช
;
> show recyclebin;
> flashback table ํ
์ด๋ธ๋ช
to before drop;
- Top-N ๋ฌธ๋ฒ => ์๋ธ์ฟผ๋ฆฌ์ order by์ ์ฌ์ฉ ๊ฐ๋ฅ!
select rownum, ์ปฌ๋ผ๋ช
1, ์ปฌ๋ผ๋ช
2
from ( select ์ปฌ๋ผ๋ช
1, ์ปฌ๋ผ๋ช
2
from ํ
์ด๋ธ๋ช
where ์กฐ๊ฑด๋ฌธ
order by ์ปฌ๋ผ๋ช
[asc | desc] )
where rownum <= N;
- alter view ์์!
- create[or replace] view ๋ทฐ๋ช
as subquery;
- drop view ๋ทฐ๋ช
;
- Sequence (์๋์ผ๋ก ๊ณ ์ ํ ๋ฒํธ๋ฅผ ๋ฐํํด์ฃผ๋ ๋ฒํธ ์์ฑ๊ธฐ = auto increment)
create sequence ์ํ์ค๋ช
increment by N // ์ํ์ค ๋ฒํธ ๊ฐ๊ฒฉ, default = 1
start with N // ์ํ์ค ๋ฒํธ์ ์์๊ฐ, default = 1
maxvalue N // ์ํ์ค ๋ฒํธ์ ์ต๋๊ฐ
minvalue N // ์ํ์ค ๋ฒํธ์ ์ต์๊ฐ
cycle // ์ํ์ค ์ํ ์ฌ๋ถ
cache N // default => cache 20
์ฌ์ฉ๋ฐฉ๋ฒ : ์ํ์ค๋ช
.nextval, ์ํ์ค๋ช
.currval
- index
- Data Dictionary
์์ฃผ์ฐ๋ ๋ฐ์ดํฐ์ฌ์ ๋ทฐ
user_tables,
user_tab_columns
user_constraints
user_views
...
'๋ฐ์ดํฐ๋ฒ ์ด์ค(DB) > ORACLE' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Oracle] SQL Developer ๋ค์ด๋ก๋ ๋ฐ ์ค์น (0) | 2025.06.02 |
---|---|
[์ค๋ผํด ํ๋ ์์ผ์ ] 1. ์ค์ตํ๊ฒฝ ๊ตฌ์ถ (1) | 2025.05.19 |