NOT EXISTS 질문드립니다

NOT EXISTS 질문드립니다

QA

NOT EXISTS 질문드립니다

답변 2

본문

insert into " $write_table set 
              wr_subject = '$wr_subject',
                 ca_name = '$ca_name',
              wr_content = '$wr_content'";
                     

위에서 WHERE NOT EXISTS 를 이용하여 
기존 wr_subject 안에 있는 값이  $wr_subject  값과 동일할 경우 
입력하지 않도록 하려는데 아직 해결이 되질 않고 있습니다 ㅠㅠ 



이 질문에 댓글 쓰기 :

답변 2

insert into $write_table (wr_subject, ca_name, wr_content)
select '$wr_subject', '$ca_name', '$wr_content' from DUAL
where not exists
(
    select wr_subject
    from $write_table
    where wr_subject = '$wr_subject'
)
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
filter #not ×
전체 5
© SIRSOFT
현재 페이지 제일 처음으로