Simple views
suggest changeA view can filter some rows from the base table or project only some columns from it:
CREATE VIEW new_employees_details AS
SELECT E.Id, FName, Salary, HireDate
FROM Employees E
WHERE HireDate > DATE '2015-01-01';
DATE '2015-01-01' is a standard date literal; SQL Server accepts the untyped string '2015-01-01'. If you select from the view:
select * from new_employees_details
| Id | FName | Salary | HireDate |
|---|---|---|---|
| 4 | Johnathon | 500 | 24-07-2016 |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents