Spring

    bad SQL grammar_Oracle과 MySQL의 차이

    문제 상황 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended ]을(를) 발생시켰습니다. java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended insert into - select - 문 select orders_seq.nextval from dual insert into orders(orderNo, customerId, totalPrice, message ,customerName, hp, zipcode, address, addressDetail ) values(#{..

    bad SQL grammar_동적 SQL문 이용(Mybatis Oracle)

    문제 상황 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00936: missing expression SQL문의 문법이 올바르지 않다고 나왔다. 바로 매퍼파일 들어가서 SQL문 확인 해결 방법 ${searchCondition} like '%' || #{searchKeyword} || '%' 써주고 그다음 써준다. where태그 를 쓰는 이유는 if태그가 여러개 일 경우가 있으니까 밖에다가 써주는게 좋다. (지금은 1개라서 실감이 안나지만..) 가령 and가 있더라도 where엘리먼트에 의해서 and나 or 이런 구문이 자동으로 삭제되고 적용된다. 위의 상황은 게시물에서 조건에 따라 검색을 할때에 쓰이는 sq..