JDBC中,用于表示数据库连接对象的是()。In JDBC, the object used to represent a database connection is ().
A. Connection
B. DBConnection
C. DataBaseConnection
D. Conn
查看答案
以下哪个方法可以获取数据库表中第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()