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 65 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
Thanks for the timely response, appreciate it


meganmoser117

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

 

Did you know?

The Centers for Disease Control and Prevention (CDC) was originally known as the Communicable Disease Center, which was formed to fight malaria. It was originally headquartered in Atlanta, Georgia, since the Southern states faced the worst threat from malaria.

Did you know?

GI conditions that will keep you out of the U.S. armed services include ulcers, varices, fistulas, esophagitis, gastritis, congenital abnormalities, inflammatory bowel disease, enteritis, colitis, proctitis, duodenal diverticula, malabsorption syndromes, hepatitis, cirrhosis, cysts, abscesses, pancreatitis, polyps, certain hemorrhoids, splenomegaly, hernias, recent abdominal surgery, GI bypass or stomach stapling, and artificial GI openings.

Did you know?

Dogs have been used in studies to detect various cancers in human subjects. They have been trained to sniff breath samples from humans that were collected by having them breathe into special tubes. These people included 55 lung cancer patients, 31 breast cancer patients, and 83 cancer-free patients. The dogs detected 54 of the 55 lung cancer patients as having cancer, detected 28 of the 31 breast cancer patients, and gave only three false-positive results (detecting cancer in people who didn't have it).

Did you know?

A recent study has found that following a diet rich in berries may slow down the aging process of the brain. This diet apparently helps to keep dopamine levels much higher than are seen in normal individuals who do not eat berries as a regular part of their diet as they enter their later years.

Did you know?

The modern decimal position system was the invention of the Hindus (around 800 AD), involving the placing of numerals to indicate their value (units, tens, hundreds, and so on).

For a complete list of videos, visit our video library