Assuming USER1 has no authorities or privileges, which of the following will allow USER1 to create a view named VIEW1 that references two tables named TAB1 and TAB2?

  1. CREATEIN privilege on the database

  2. REFERENCES privilege on TAB1 and TAB2

  3. CREATE_TAB privilege on the database

  4. SELECT privilege on TAB1 and TAB2


Correct Option: D

AI Explanation

To answer this question, you need to understand the different privileges and authorities needed to create a view that references tables.

Let's go through each option to understand why it is correct or incorrect:

Option A) CREATEIN privilege on the database - This option is incorrect because the CREATEIN privilege allows the user to create objects within a specified schema, but it does not grant the user the ability to reference tables or create views.

Option B) REFERENCES privilege on TAB1 and TAB2 - This option is incorrect because the REFERENCES privilege allows the user to create foreign key constraints that reference the specified tables, but it does not grant the user the ability to create views.

Option C) CREATE_TAB privilege on the database - This option is incorrect because the CREATE_TAB privilege does not exist in the context of creating views. It may be a made-up privilege or a misrepresentation of the actual privilege required.

Option D) SELECT privilege on TAB1 and TAB2 - This option is correct because the SELECT privilege allows the user to query the specified tables and retrieve data. When creating a view, the user needs to reference the tables and retrieve data from them, which requires the SELECT privilege.

Therefore, the correct answer is Option D. This option is correct because the SELECT privilege on TAB1 and TAB2 allows USER1 to create a view named VIEW1 that references the two tables.

Find more quizzes: