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 47 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


cpetit11

  • Member
  • Posts: 321
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Signs of depression include feeling sad most of the time for 2 weeks or longer; loss of interest in things normally enjoyed; lack of energy; sleep and appetite disturbances; weight changes; feelings of hopelessness, helplessness, or worthlessness; an inability to make decisions; and thoughts of death and suicide.

Did you know?

Symptoms of kidney problems include a loss of appetite, back pain (which may be sudden and intense), chills, abdominal pain, fluid retention, nausea, the urge to urinate, vomiting, and fever.

Did you know?

Signs and symptoms that may signify an eye tumor include general blurred vision, bulging eye(s), double vision, a sensation of a foreign body in the eye(s), iris defects, limited ability to move the eyelid(s), limited ability to move the eye(s), pain or discomfort in or around the eyes or eyelids, red or pink eyes, white or cloud spots on the eye(s), colored spots on the eyelid(s), swelling around the eyes, swollen eyelid(s), and general vision loss.

Did you know?

Studies show that systolic blood pressure can be significantly lowered by taking statins. In fact, the higher the patient's baseline blood pressure, the greater the effect of statins on his or her blood pressure.

Did you know?

The oldest recorded age was 122. Madame Jeanne Calment was born in France in 1875 and died in 1997. She was a vegetarian and loved olive oil, port wine, and chocolate.

For a complete list of videos, visit our video library