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 49 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
Great answer, keep it coming :)


shailee

  • Member
  • Posts: 392
Reply 3 on: Yesterday
Excellent

 

Did you know?

Adolescents often feel clumsy during puberty because during this time of development, their hands and feet grow faster than their arms and legs do. The body is therefore out of proportion. One out of five adolescents actually experiences growing pains during this period.

Did you know?

Each year in the United States, there are approximately six million pregnancies. This means that at any one time, about 4% of women in the United States are pregnant.

Did you know?

ACTH levels are normally highest in the early morning (between 6 and 8 A.M.) and lowest in the evening (between 6 and 11 P.M.). Therefore, a doctor who suspects abnormal levels looks for low ACTH in the morning and high ACTH in the evening.

Did you know?

Egg cells are about the size of a grain of sand. They are formed inside of a female's ovaries before she is even born.

Did you know?

Though newer “smart” infusion pumps are increasingly becoming more sophisticated, they cannot prevent all programming and administration errors. Health care professionals that use smart infusion pumps must still practice the rights of medication administration and have other professionals double-check all high-risk infusions.

For a complete list of videos, visit our video library