merge

SQL 2009. 11. 29. 23:32
데이터가 있으면 update를 하고 데이터가 없으면 insert를 하는 함수
오라클 전용인듯..?

merge into kt_map as kt
using dual
on (kt.id = '111')                                      // 조건절
when matched then
update set kt.name = '222'                       //update
when not matched then
insert (kt.id,kt.name) values ('111','222')   //insert

'SQL' 카테고리의 다른 글

function 작성하는법  (0) 2012.05.31
오라클 덤프뜨기 (DMP 파일)  (0) 2010.05.03
TOAD 단축키  (0) 2010.03.15
오라클 함수  (0) 2009.11.30
문자열 연결하는 방법  (0) 2009.11.29

글 보관함

카운터

Total : / Today : / Yesterday :
get rsstistory!