查询结果集ResultSet对象是以统一的行列形式组织数据的,执行ResultSet rs=stmt.executeQuery("select bid,name,author,publish,price from book");语句,得到的结果集rs的列数为()。
A: 4
B: 5
C: 6
D: 不确定
A: 4
B: 5
C: 6
D: 不确定
举一反三
- 查询结果集ResultSet对象是以统一的行列形式组织数据的,执行ResultSet rs = stmt.executeQuery("select bid,name,author,publish,price from book");语句,得到的结果集rs每一次rs能看到 行
- 执行ResultSet rs = stmt.executeQuery ("select bid,name,author,publish,price from book");语句,得到的结果集rs的列数为( ) A: 4 B: 5 C: 6 D: 不确定
- 中国大学MOOC: 执行ResultSet rs = stmt.executeQuery (select bid,name,author,publish,price from book);语句,得到的结果集rs的列数为( )
- 假定已经获得一个数据库连接,使用变量conn来表示。下列语句中能够正确获得结果集的有__1__。(选择两项)[br][/br] A.Statement stmt = conn.createStatement()__2__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] B.Statement stmt = conn.createStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__3__;[br][/br] C.PreparedStatement stmt = conn.prepareStatement()__4__;[br][/br] ResultSet rs = stmt.executeQuery(“SELECT * FROM STUDENT”);[br][/br] D.PreparedStatement stmt = conn.prepareStatement(“SELECT * FROM STUDENT”);[br][/br] ResultSet rs = stmt.executeQuery()__5__;
- 检索student中所有记录的语句如下 String sql="select * from student"; 执行命令,返回执行结果的语句为() A: ResultSet rs=stmt.executeQuery(sql); B: ResultSet rs=stmt.execute(sql); C: ResultSet rs=stmt.executeUpdate(sql);