要删除book表中书籍(bookName)是“java”的记录,以下代码正确的是()
String sql=”delete from book where bookName=?”;
PreparedStatement pst=con.preparedStatement(sql);
____________________________
pst.execute();
String sql=”delete from book where bookName=?”;
PreparedStatement pst=con.preparedStatement(sql);
____________________________
pst.execute();
举一反三
- 要删除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”的记录,横线上应填写的正确代码的是 ( )<br/>String sql=”delete from book where bookName=?”;<br/>PreparedStatement pst=con.preparedStatement(sql);<br/>______________________________<br/>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”的记录,以下代码正确的是( )Stringsql="deletefrombookwherebookName=?";PreparedStatementpst=con.prepareStatement(sql);―――――――――――――――――pst.execute(); A: pst.setString(1,"java"); B: pst.setString(0,"java"); C: pst.setInt(0,"java"); D: 以上选项都不正确
- BookStore数据库中有图书表 Book(BookCode, BookName, Author, PublisherCode, PublishTime,BookSort, ISBN, BookPicture, ContentInro, Price, Discount) 查询图书名称(BookName)含有“程序”的图书信息。SQL语句: SELECT BookCode,BookName,Author,Price,Discount FROM Book WHERE Name=“%程序%”