본문 바로가기
Web Programming/JAVA MVC

java.sql.SQLSyntaxErrorException: ORA-00936: missing expression

by hyeon-H 2021. 5. 12.
728x90
반응형

Java.sql.SQLSyntaxErrorException : ORA-00936 : 누락된 표현식

SQL문에서 select에 누락된 부분이 있다?

 

//오류를 발생시킨 SQL문

String sql = "select B.* from " + 
			 "(select rownum as rnum, A * from " + 
			 "(select * from board_api where delYn='N' order by originbidx desc, depth asc) A " + 
			 "where rownum <= ?) B " + 
			 "where B.rnum >= ?";

 

//오류 해결된 SQL문

String sql = "select B.* from " + 
		   	 "(select rownum as rnum, A. * from " + 
			 "(select * from board_api where delYn='N' order by originbidx desc, depth asc) A " + 
			 "where rownum <= ?) B " + 
			 "where B.rnum >= ?";

 

진짜 안보인다... 두번째 줄의 A뒤에  " . "이 빠져있다...

728x90
반응형