Background Image

FORUM

2013.03.06 22:45

if exists 조건 처리문?

조회 수 63604 추천 수 0 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
  • ?
    이용미 2013.03.08 01:07

    안녕하세요.

    CUBRID에서도 mysql과 동일하게 'if exists', 'exists' 문을 사용하실 수 있습니다.

     

    [DDL에서의 사용법 : 8.4.0 부터 지원]

    테이블 삭제 : drop table if exists tmp;

                     참고 링크 : http://www.cubrid.com/online_manual/843/syntax/syntax_table_delete.htm

    테이블 생성 : 지원하고 있지 않습니다.

     

    [DML에서의 사용법 : 8.1 부터 모두 지원]

    데이터 검색 : select * from tmp where exitst(select col from tmp2 where col=1);

                     참고 링크 : http://www.cubrid.com/online_manual/843/syntax/syntax_operator_where_exists.htm

    데이터 입력 : insert into tmp(col) select 1 from db_root where not exists(select col from tmp where col=1);

                     insert into tmp(col) select 2 from db_root where exists(select col from tmp where col=1);

    데이터 삭제 : delete from tmp where exists(select col from tmp where col=3) and col=3;

    데이터 검색, 입력, 삭제의 경우는 where 절에 exists를 사용해야 하므로 부득이하게 위와 같이 사용합니다. 이는 CUBRID 뿐만 아니라, mysql도 동일한 것으로 알고 있습니다.

  • ?
    콩이아부지 2013.03.08 01:51

    네 답변 감사합니다.


  1. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4250
    read more
  2. 널포인트 익셉션 에러가 납니다

    Date2010.08.06 By유니콘 Views11322
    Read More
  3. 서브쿼리 질문

    Date2010.02.03 By초보 Views11332
    Read More
  4. loaddb시 피시 메모리 증가와 스왑에 따른 종료문제

    Date2012.08.28 By천상하늘 Views11332
    Read More
  5. Query Browser Eclipse plug-in 설치시 오류

    Date2014.02.07 By규리 Views11338
    Read More
  6. Cubrid shard for Mysql 구성 중 질문 입니다.

    Date2013.05.25 By태연 Views11341
    Read More
  7. PHP + Apache + Cubrid 연동 질문 입니다.

    Date2011.07.27 By지누 Views11347
    Read More
  8. DB 삭제 후 생성??

    Date2009.12.02 By푸른잔디 Views11348
    Read More
  9. 큐브리드매니저의 아이콘 개선 요청

    Date2009.09.24 By고영진 Views11361
    Read More
  10. CentOS 6.3 + cubrid + nforge 설치가 잘 않되네요.

    Date2013.04.08 By김영환 Views11364
    Read More
  11. session list와 kill 하는 방법이 있는지요?

    Date2013.04.02 Byhangum Views11365
    Read More
  12. manager server에 이상이 생긴 거 같습니다.

    Date2009.03.05 ByDevin Views11389
    Read More
  13. 연결(Connection)을 얻을 수 없습다. 브로커와 서버의 구동상태를 점검하십시오.

    Date2010.11.18 Bybaeheulk Views11391
    Read More
  14. 이미지를 한번에 저장 BLOB이용

    Date2013.05.28 Byjhdreamy Views11394
    Read More
  15. 윈도우 도스 모드에서 쿼리 실행 방법 문의

    Date2011.10.12 ByProMind Views11400
    Read More
  16. Cubrid Manager에 접속이 안됩니다.

    Date2010.08.23 By들뿔 Views11403
    Read More
  17. CUBRID와 PHP 연동 문제

    Date2010.06.06 ByEle Views11426
    Read More
  18. 복제 문의해요

    Date2009.06.28 By삽질쟁이 Views11435
    Read More
  19. mssql의 linked server 와 같은 기능 관련

    Date2014.03.06 By응가돌이 Views11436
    Read More
  20. php cubrid_bind() 에 관하여.

    Date2009.04.05 By송효진 Views11438
    Read More
  21. 큐브리드 매니저 어떤 버전을 사용해야 하는지요 ^^;

    Date2011.01.13 By어익후 Views11439
    Read More
Board Pagination Prev 1 ... 151 152 153 154 155 156 157 158 159 160 ... 199 Next
/ 199

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales