In SQL, the ______ command is used to recompile view.

2020

In SQL, the ______ command is used to recompile view.

  1. A.

    ALTER VIEW

  2. B.

    DEFINE VIEW

  3. C.

    CREATE VIEW

  4. D.

    COMPILE VIEW

Attempted by 250 students.

Show answer & explanation

Correct answer: A

The correct option is A (ALTER VIEW).

In database dialects that support explicit view recompilation (such as Oracle SQL), the ALTER VIEW view_name COMPILE; statement is used to manually recompile an invalid or outdated view. This occurs when underlying base tables are modified, ensuring dependencies are verified without recreating the view definition.

Explore the full course: Niacl Ao It Specialist