exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 130 discussion

Actual exam question from Oracle's 1z0-819
Question #: 130
Topic #: 1
[All 1z0-819 Questions]

Given the data of the EMP table:



Assuming that jdbcURL, username, and password are declared and initialised.



Which two happen upon execution? (Choose two.)

  • A. Three SQL statements are executed.
  • B. Two PreparedStatement objects are created.
  • C. Two SQL statements are executed.
  • D. Memory leaks because Connection, PreparedStatements, and ResultSet are not closed.
  • E. Three PreparedStatement objects are created.
  • F. A SQLException is thrown because the ResultSet is not closed.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
2 months, 2 weeks ago
Selected Answer: AB
Actually two cases if the table RECRUITING exists then answer AB if it doesn't answer BC if the tabel RECRUITING exists then three sql statements executed One for select and two for update in the loop
upvoted 1 times
...
ASPushkin
2 months, 2 weeks ago
answer : BC C. is correct There are just two sql statements "SELECT oid, role FROM desp_roles WHERE role = ?" and "INSERT INTO RECRUITING (ID, NAME) VALUES(?, ?)" it is not clear about RECRUITING table if it doesn't exist then there is an java.sql.SQLSyntaxErrorException: Table 'kwikorder.recruiting' doesn't exist but anyway it was executed B. obviously thats right they are two prepared statements created query, update F. failed Connection and two PreparedStatements are automatically closed in tryWithResource exceptions. A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results. actually there is just one ResultSet ResultSet rs = query.executeQuery(); it executed just one timeand closed automatically after Prepatred statements D. FAILED see F
upvoted 1 times
...
cathDev
3 months, 2 weeks ago
Selected Answer: AB
two SELECT queries and one INSERT INTO statement. It creates two PreparedStatement objects: “query” for the SELECT query and “update” for the INSERT INTO statement.
upvoted 1 times
...
d7bb0b2
6 months, 1 week ago
Selected Answer: BC
2 prepare statemt ok 2 statements are executed independently of the number of times
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago