package com.jdbc.method;
import java.sql.ResultSet;
import java.sql.SQLException;
public class jdbc$Query$test {
public static void main(String[] args) {
// TODO Auto-generated method stub
int a=2;
int b=2;
Basedao base=new Basedao();
String sql="select top ? * from(select row_number() over(order by hid asc)as rownum,a.*,b.*from(hero as a inner join country as b on a.countryid=b.cid))as tb where rownum > ?";
ResultSet rs= base.getQuery(sql,a,b);
try {
while(rs.next()) {
System.out.println(rs.getString(1)+"\t"+rs.getString(2));
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}