sql - Get specified number of rows in Oracle 11g -
I want to get the number of rows in the SQL. I use
by selecting ROWNUM, FULL_NAME from the command OSQS_INSTITUTION FULL_NAME where between 10 and 20 between ROWNUM and
Try the code> ROWNUM, FULL_NAME selections OSQS_INSTITUTION command FULL_NAME limits 10,20 and both return the same error
SQL command properly Not finished
edit: stringbilder sqlStatement = new stringbilder (); SqlStatement.append ("SELECT USER_NO, FULL_NAME, active"); SqlStatement.append ("("); sqlStatement.append (Select "USER_NO, FULL_NAME, Active, ROW_NUMBER () Order (FULL_NAME Order) RN"); sqlStatement.append ("from osqs_institution"); sqlStatement Append (") where between rn? And?"); Prepared position pstmt = null; Pstmt = con.prepareStatement (sqlStatement.toString ()); Pstmt.setInt (1, from); Pstmt.setInt (2, from); Rs = pstmt.executeQuery (); Try and hold the necessary.
In the first version, you the syntax for your query is wrong After the command, the where section is specified. The second version works in MySQL, but not in Oracle
In any case you can not use it with any rows.
Try it instead:
with qry AS qry where between 10 and 20 rn you do not use Wish to ROW_NUMBER from the function (select FULL_NAME, ROW_NUMBER (more than the command by FULL_NAME) from the osqs_institute, select RN), FULL_NAME, then try:
Select FNL from FULL_NAME (FULL_NAME, from ROWNUM to RN (by selecting the osqs_institution command * by FULL_NAME) where 10 and 20
Comments
Post a Comment