以下哪个方法可以获取数据库表中第1列的值?()Which of the following methods can get the value of the first column in the database table?( )
A. rs.fetchInt(1)
B. rs.fetchInt(0)
C. rs.getInt(1)
D. rs.getInt(0)
查看答案
以下哪个是正确的JDBC连接字符串?()Which of the following is the correct JDBC connection string?()
A. jdbc:mysql:/localhost/3306/mydb
B. jdbc:mysql://localhost:3306/mydb
C. jdbc//mysql:/localhost:3306/mydb
D. jdbc:mysql://localhost/3306/mydb
以下哪个是常用的MySQL JDBC驱动程序?()Which of the following is a commonly used MySQL JDBC driver?()
A. com.mysql.cj.jdbc.Driver
B. mysql.com.cj.jdbc.Driver
C. com.mysql.JDBCDriver
D. com.mysql.jdbc.cj.jDriver
在JDBC中,要实现事务的回滚,可以调用Connection的方法()。In JDBC, to roll back a transaction, you can call the connection method ().
A. restore()
B. goback()
C. commit()
D. rollback()
在MySQL数据库中,以下哪条语句能获得前10条记录?()In MySQL database, which of the following statements can obtain the first 10 records?()
A. select * from mytable top 10 ;
B. select * from mytable 10 top;
C. select * from mytable limit 10;
D. select * from mytable 10 limit ;