Question: Java Question 6 Which statement will set the value John to the first parameter of the PreparedStatement below? String sql = insert into Student (first,
Java
Question 6
Which statement will set the value John to the first parameter of the PreparedStatement below? String sql = insert into Student (first, middle, last) values (?, ?, ?) ; PreparedStatement ps = conn.prepareStaement(sql);
Question 7
Which statement is used to execute the query Select * from products using the Statement object stmt?
| | stmt.executeUpdate(Select * from products); |
| | stmt.exectue(Select * from products); |
| | stmt.exectueQuery(Select * from products); |
| | stmt.query(Select * from products); |
Question 8
What statement needs to be included below to retrieve all rows from the Invoices table with InvoiceTotal greater than 100? String sql = "SELECT InvoiceDate, InvoiceTotal " + "FROM Invoices WHERE InvoiceTotal > ?"; PreparedStatement ps = connection.prepareStatement(sql); //what goes here ResultSet invoices = ps.executeQuery();
Question 9
What must you make available to your application before you can use JDBC to connect to a database?
Question 10
A _____ is a swing GUI component that can be bound to a database to display the results of a query.