Create SQL View
This command is used to build views in a database . You can design a view using a single table or several tables. The basic Syntax for creating VIEW: CREATE VIEW view_name AS SELECT column1, column2, column3... FROM table_name WHERE [condition]; The name of the VIEW you want to construct is view_name. Also, the WHERE conditions might be omitted. For the records to be included in the VIEW, these conditions must be met. Creating a view from a single Table: Query CREATE VIEW Customer_view AS SELECT Customer_id, Name, Address FROM Customer_Details WHERE Address = "Miami"; As you can see, this CREATE VIEW statement uses the results of the previous SELECT statement to construct a virtual table. To view the output, you can now query the SQL VIEW as follows: SELECT * FROM Customer_view; Creating View from Multiple Tables Query CREATE VIEW Order_view AS SELECT Customer_ Details.Name , Customer_Details.Address, Customer_Order.Product FROM Customer_Details, Customer_Order WHERE Custome...