Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation and Management - Basic operation management task (system information function)

Sample Question


In the context of the ‘current_user’ function, choose two appropriate answers.

  1. When SELECT current_user; is executed, a list of user names currently connected to the database are displayed.
  2. When SELECT current_user; is executed, the user name of the user who executed this SELECT statement is displayed.
  3. SELECT current_user ('bob'); allows you to change the user who is running the session.
  4. You can use UPDATE current_user = 'bob'; to change the user running the session.
  5. An error will occur if you add parentheses, such as SELECT current_user ();.

※This sample exam is different from those that appear in the actual OSS-DB Exam.

Answer and Explanation

current_user is a function that returns the name of the user executing the context and takes no arguments.

There is no user change function as described in C or D.

It is a function that occupies a special position in SQL and parentheses can not be added after the function name. It will result in an error. In the same way, there are current_date and so on as a function that gives an error when you put parentheses. 

Therefore, the correct answers are B and E.