2011-10-14 11:23:02 SQL 4 Oracle 오라클용 sql 실무 ▒ PLSQL- DATA가 있으면 UPDATE, 없으면 INSERT declare P_cnt number := 0; find_CNT number := 0; cursor P_cursor is select 고객ID, 고객상태, 취득년월일, 취득점수 from 목적_Table where 취득년월일 = '20111001' ; begin for box in P_cursor loop select count(*) into P_cnt from 평가_Table where 고객ID = box.고객ID and 취득년월일 = box.취득년월일 ; IF P_cnt = 0 then insert into 평가_Table values(box.고객ID ,b..