SQL VIEW
• View is a virtual table which contains rows and columns, just like a real table.
• View is created with the CREATE VIEW statement.
• A view contains no data of its own. Views do not actually store data rather they derive their data from tables on which they are based. The view is stored as a SELECT statement in the data dictionary.
• If you want to get the same result set, you can save this query into a text file, open it, and execute it again. SQL Server provides a better way to save this query in the database through a view.
• You can restrict users to access directly to a table and allow them to access a subset of data via views.
• If any changes occur in the underlying table, the same changes reflected in the views also.
• We can also change the name of a view in SQL Server. SP_RENAME View_Old_Name, View_New_Name
• We can also update a view in SQL Server. We can do this by using the ALTER VIEW command
-------------------------------------------------------------------------------
create view viewempdetails
as
select * from empdetails
create view test123
as
select empdetails.name, cars.color from empdetails join Cars
on empdetails.id=cars.id
alter view test234
as
select * from empdetails
On this page of the site you can watch the video online SQL View. Session 21 with a duration of hours minute second in good quality, which was uploaded by the user Sunny@Pandita 02 June 2024, share the link with friends and acquaintances, this video has already been watched 125 times on youtube and it was liked by 10 viewers. Enjoy your viewing!