• +91 9723535972
  • info@interviewmaterial.com

DBMS Interview Questions and Answers

Question - What do you understand by the view and mention the steps to create, update and drop a view?

Answer -

A view in SQL is a single table, which is derived from other tables. So, a view contains rows and columns similar to a real table and has fields from one or more table.

To create a view, use the following syntax:

  • CREATE VIEW ViewName AS
  • SELECT Column1, Column2, ..., ColumnN
  • FROM TableName
  • WHERE Condition;
To update a view, use the following syntax:

  • CREATE VIEW OR REPLACE ViewName AS
  • SELECT Column1, Column2, ..., ColumnN
  • FROM TableName
  • WHERE Condition;
To drop a view, use the following syntax:

  • DROP VIEW ViewName;

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners