nerdexam
Oracle

1Z0-882 · Question #101

You are connected to a MySQL server and using a prepared statement. You accidentally exit your session. What will happen if you log back in to use your prepared statement?

The correct answer is D. The statement no longer exists. "A prepared statement is specific to the session in which it was created. If you terminate a session without deallocating a previously prepared statement, the server deallocates it

SQL Data Manipulation

Question

You are connected to a MySQL server and using a prepared statement. You accidentally exit your session. What will happen if you log back in to use your prepared statement?

Options

  • AThe statement exists, but will need to be deallocated and re-created.
  • BThe statement exists, but the user variables need to be redefined.
  • CThe statement can be used, if the MySQL server hasn't been restarted.
  • DThe statement no longer exists.

How the community answered

(24 responses)
  • A
    13% (3)
  • B
    8% (2)
  • C
    4% (1)
  • D
    75% (18)

Explanation

"A prepared statement is specific to the session in which it was created. If you terminate a session without deallocating a previously prepared statement, the server deallocates it

Topics

#prepared statements#session scope#connection lifecycle#PREPARE

Community Discussion

No community discussion yet for this question.

Full 1Z0-882 Practice