SQL VIEWS – it works as real table basis on defined and created script. But dependent object must be available at the time of execution.
Example – Table A has field name Product it is used in view when created , but after created column is deleted from table, if created view is called in a query, it will through an error.
Note :it does not store the data physically, it always execute the command and shows the result as table.
CREATE VIEW DATAVIEW
DECLARE @DM INT
SELECT A.S_NO , A.PRODUCT , B.TYPE from BRAND AS A
ON A.PRODUCT = B.PRODUCT
WHERE A.YEAR = @DM