SQL CREATE VIEW: A view is a virtual table. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.
Syntax: CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
Example:CREATE VIEW [sample] AS
SELECT employeeID,employeeName
FROM employee
WHERE salary > 10000
Syntax: CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition
Example:CREATE VIEW [sample] AS
SELECT employeeID,employeeName
FROM employee
WHERE salary > 10000
No comments:
Post a Comment