CREATE VIEW EmployeeNames AS
SELECT FirstName, LastName FROM Employees;
CREATE INDEX IX_SalesSummary_Product ON SalesSummaryView (ProductID);
CREATE VIEW MyView AS
SELECT * FROM MyTable WHERE Column1 = 'Value';
SELECT * FROM MyView;
DROP VIEW MyView;
sp_rename 'OldViewName', 'NewViewName';
SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'MyView';
ALTER VIEW MyView AS
SELECT * FROM UpdatedTable;
CREATE VIEW MySchema.MyView WITH SCHEMABINDING AS
SELECT * FROM MyTable;