• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Python, SQL 게시판 DELIMITER 질문

DELIMITER 질문

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #68913

    최영우
    참가자
    DELIMITER $$
    $$
    CREATE PROCEDURE mart.get_call()
    BEGIN
    	SELECT * FROM product WHERE 가격 > 4000;
    END
    $$
    DELIMITER ;
    
    이걸 컨트롤 엔터로 사용할려고 하면
    처음에 DELIMITER $$ 바로밑 $$에서 빨간줄이 그어집니다
    구글링해보니 
    
    DELIMITER $$
    CREATE PROCEDURE mart.get_call()
    BEGIN
    	SELECT * FROM product WHERE 가격 > 4000;
    END
    $$
    DELIMITER ;
    
    이렇게 쓰길레 이렇게 해보니
    이제는 BEGIN END 사이에 SELECT~~~ 가 빨간줄이 그어지네요
    
    에러내용은
    SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
    
    org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
    	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
    	at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:581)
    	at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$1(SQLQueryJob.java:490)
    	at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:173)
    	at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:497)
    	at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:916)
    	at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:3800)
    	at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:123)
    	at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:173)
    	at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:121)
    	at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5035)
    	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
    	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
    	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
    	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
    	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763)
    	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)
    	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:329)
    	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.lambda$0(JDBCStatementImpl.java:131)
    	at org.jkiss.dbeaver.utils.SecurityManagerUtils.wrapDriverActions(SecurityManagerUtils.java:96)
    	at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
    	... 12 more
    
    이렇게 뜹니다
    
    저번에도 이거 질문으로 올렸는데 해결이 안되서 다시 올립니다 ㅠ
    #68918

    codingapple
    키 마스터
    이상한 공백같은게 있을 수 있어서 복붙말고 처음부터 다시 직접 타이핑해봅시다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관, 개인정보처리방침
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠