Oracle -> mssql 2008 R2 로 변경했는데 저런 오류가 나네요 혹시 도움좀 받을 수 있을까요
String sql = "SELECT *" +
" FROM guesttb" +
" WHERE id IN (SELECT id" +
" FROM (SELECT rownum rnum, id FROM (SELECT id FROM guesttb ORDER BY id DESC))" +
" WHERE rnum between ? and ?)" +
" ORDER BY ID DESC";
<script src="chrome-extension://hhojmcideegachlhfgfdhailpfhgknjm/web_accessible_resources/index.js"></script>
Comment 1
-
이리
2017.11.08 13:18
(SELECT id FROM guesttb ORDER BY id DESC)
이부분에 ORDER BY 하시려면 TOP 구문을 넣으셔야 합니다.