Exam: DP-900: Microsoft Azure Data Fundamentals 0 Likes

You need to modify a view in a relational database by adding a new (DP-900)

Updated on 08/08/2024

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

Which statement should you use?

A. MERGE
B. ALTER
C. INSERT
D. UPDATE


Solution

Correct answer: B. ALTER.
To modify an existing view in a relational database by adding a new column, you should use the ALTER VIEW statement.

The syntax for altering a view to add a new column is:
ALTER VIEW view_name
AS
SELECT existing_columns, new_column
FROM table_name


Here's a breakdown of the other options:
A. MERGE - The MERGE statement is used to perform insert, update, and delete operations on a target table based on the changes in a source table. It is not used to modify a view.
C. INSERT - The INSERT statement is used to add new rows to a table, not to modify the structure of a view.
D. UPDATE - The UPDATE statement is used to modify the values of existing rows in a table, not to modify the structure of a view.
So, the correct SQL statement to use to add a new column to an existing view is the ALTER VIEW statement.

Category: Identify considerations for relational data on Azure

There are no comments yet.

Authentication required

You must log in to post a comment.
Log in to like this solution

Log in

Support us!
Subscribe Now

Cookies Consent

We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All" you consent to our use of cookies. Privacy Policy.