Modify View in Relational Database - Adding New Column

Add New Column to View

Question

You need to modify a view in a relational database by adding a new column.

Which statement should you use?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B

The correct statement to use when modifying a view in a relational database by adding a new column is ALTER. Therefore, the answer to this question is option B.

The ALTER statement is used in SQL to modify the structure of a database object. In this case, the ALTER statement is used to modify the view and add a new column. The syntax for the ALTER statement is as follows:

sql
ALTER VIEW view_name ADD column_name data_type;

In this syntax, view_name is the name of the view that you want to modify, column_name is the name of the new column that you want to add, and data_type is the data type of the new column.

The MERGE statement is used to update data in a target table from a source table, based on a specified condition. The INSERT statement is used to insert new data into a table. The UPDATE statement is used to