ps.setValue(1, 100); statement needs to be included below to retrieve all rows from the Invoices table with InvoiceTotal greater than 100
b. ps.setValue(1, 100);
Step-by-step explanation:
Here, in this code snippet, we have to return rows of InvoiceDate and InvoiceTotal from the table Invoices only when the InvoiceTotal is greater than 100. PreparedStatement is a subtype of Statement class Java. It is used to parameterize a query.
Since we have to display the records from the Invoice table after checking the condition, we call the method of PreparedStatement class, ps.setDouble(1,100) as the records start from 1 and end at 100.