What is a view in SQL?

Answered by Kaushik Chandra

A view is a virtual table and it is a named set of SQL statements that can be later referenced and utilized as a table.

Syntax,

CREATE VIEW view_name AS

SELECT column1, column2, ….

FROM table_name

WHERE condition;

Example,

CREATE VIEW [INDIA Customers] AS

SELECT CustomerName, ContactName

FROM Customers

WHERE Country = "INDIA";



Your Answer

Interviews

Parent Categories