语句“Statement s=new Statement();”创建了Statement的实例对象。然后可通过Statement的方法executeQuery执行删除记录的处理。( )
举一反三
- 2.cn是Connection对象,创建Statement 对象的方法是( ) A: Statement st=new Statement (); B: Statement st=cn.newStatement() C: Statement st=cn.createNewStatement() D: Statement st=cn.createStatement()
- 以下语句可以创建Statement接口对象的是( )(注:conn为数据连接对象) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); C: Statement sm = conn. getStatement (); D: Statement sm = conn. prepareStatement ();
- 要在Connection对象conn上创建Statement对象,可以使用________: Statement statement = Connection.createStatement();|Statement statement = conn.createStatement();|Statement statement = conn.statement();|Statement statement = connection.create();
- 以下语句可以创建Statement接口对象的是( ) A: Statement sm = new Statement() B: Statement sm = conn. createStatement(); (注:conn为数据连接对象) C: Statement sm = conn. getStatement ();(注:conn为数据连接对象) D: Statement sm = conn. prepareStatement ();(注:conn为数据连接对象)
- Statement接口的executeQuery(String sql)方法用于执行SQL的【 】语句