170k views
1 vote
SQL views are always updatable when ________.

1) the view is based on a single table with no computed columns, and all non-null columns are present in the view
2) the view is based on any number of tables, with or without computed columns, and the INSTEAD OF trigger is defined for the view
3) the view is based on multiple tables, the update is being done on the most subordinate table, and the rows of that table can be uniquely identified
4) A and B
5) A, B, and C

1 Answer

4 votes

Final answer:

SQL views are updatable based on different conditions, such as single table views with no computed columns, views with an INSTEAD OF trigger defined, and views based on multiple tables where the update is done on the most subordinate table with uniquely identifiable rows.

Step-by-step explanation:

SQL views are updatable in certain conditions:

  1. When the view is based on a single table with no computed columns, and all non-null columns are present in the view.
  2. When the view is based on any number of tables, with or without computed columns, and the INSTEAD OF trigger is defined for the view.
  3. When the view is based on multiple tables, the update is being done on the most subordinate table, and the rows of that table can be uniquely identified.

Therefore, option 5, A, B, and C, is the correct answer.

User Madison Caldwell
by
8.4k points