This topic contains a solution. Click here to go to the answer

Author Question: If a prepared statement preparedStatement is a SQL SELECT statement, you execute the statement using ________. (Read 59 times)

s.tung

  • Hero Member
  • *****
  • Posts: 577

Question 1

Suppose a prepared statement is created as follows:

Statement preparedStatement = connection.prepareStatement
("insert into Student (firstName, mi, lastName) " +
"values (?, ?, ?)");

To set a value John to the first parameter, use  ________.
◦ preparedStatement.setString(1, "John");
◦ preparedStatement.setString(1, 'John');
◦ preparedStatement.setString(0, "John");
◦ preparedStatement.setString(0, 'John');

Question 2

If a prepared statement preparedStatement is a SQL SELECT statement, you execute the statement using ________.
◦ preparedStatement.executeUpdate();
◦ preparedStatement.executeQuery();
◦ preparedStatement.query();
◦ preparedStatement.execute();


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by s.tung on May 6, 2020

IRincones

  • Sr. Member
  • ****
  • Posts: 321
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 56% of students answer this correctly




s.tung

  • Member
  • Posts: 577
Reply 2 on: May 6, 2020
:D TYSM


diana chang

  • Member
  • Posts: 288
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

The use of salicylates dates back 2,500 years to Hippocrates’s recommendation of willow bark (from which a salicylate is derived) as an aid to the pains of childbirth. However, overdosage of salicylates can harm body fluids, electrolytes, the CNS, the GI tract, the ears, the lungs, the blood, the liver, and the kidneys and cause coma or death.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

Did you know?

Liver spots have nothing whatsoever to do with the liver. They are a type of freckles commonly seen in older adults who have been out in the sun without sufficient sunscreen.

Did you know?

The longest a person has survived after a heart transplant is 24 years.

Did you know?

As many as 20% of Americans have been infected by the fungus known as Histoplasmosis. While most people are asymptomatic or only have slight symptoms, infection can progress to a rapid and potentially fatal superinfection.

For a complete list of videos, visit our video library