04pallav
9/13/2017 - 9:52 PM

views,temp tables, CTE, derived table

views,temp tables, CTE, derived table

create view view1 as (select * from product)
##gets saved into database

select * into #temptable1 from product
##gets saved into temporary database
## creating a local temporary table using a single # pound sign.
## if you use two pound signs '##' a global table will be created which can be
accessed from other connections







We use derived tables all the time when u use subquery and rename it.
scope: only within that sql code