要删除book表中书籍(bookName)是”java”的记录,横线上应填写的正确代码的是 ( )
String sql=”delete from book where bookName=?”;
PreparedStatement pst=con.preparedStatement(sql);
______________________________
pst.execute();
A: pst.setString(1,”java”);
B: pst.setString(0,”java”);
C: pst.setInt(0,”java”);
D: 以上选项都不正确
String sql=”delete from book where bookName=?”;
PreparedStatement pst=con.preparedStatement(sql);
______________________________
pst.execute();
A: pst.setString(1,”java”);
B: pst.setString(0,”java”);
C: pst.setInt(0,”java”);
D: 以上选项都不正确
举一反三
- 要删除book表中书籍(bookName)是”java”的记录,以下代码正确的是(AString sql=”delete from book where bookName=?”;PreparedStatement pst=con.preparedStatement(sql);______________________________pst.execute(); A: pst.setString(1,”java”); B: pst.setString(0,”java”); C: pst.setInt(0,”java”); D: 以上选项都不正确
- 要删除book表中图书名称(bookName)是“java程序设计语言”的记录,应该填入空白处的语句是String sql= "DELETE FROM book WHERE bookName=?";PreparedStatement pst=con.preparedStatement(sql);______________________________pst.execute(); A: pst.setString(1,"java程序设计语言"); B: pst.setString(0,"java程序设计语言"); C: pst.setInt(0,"java程序设计语言"); D: 以上选项都不正确
- 要删除book表中书籍(bookName)是“java”的记录,以下代码正确的是() String sql=”delete from book where bookName=?”; PreparedStatement pst=con.preparedStatement(sql); ____________________________ pst.execute();
- 要删除book表中书籍名称(bookName)是“java”的记录,以下代码正确的是( )Stringsql="deletefrombookwherebookName=?";PreparedStatementpst=con.prepareStatement(sql);―――――――――――――――――pst.execute(); A: pst.setString(1,"java"); B: pst.setString(0,"java"); C: pst.setInt(0,"java"); D: 以上选项都不正确
- 设有如下定义: struct st { int a; float b; }st1, *pst; 若有pst = &st1; 则下面引用不正确的是()。