I saw a SQL where they have used a view definition along with the view name to select some fields from the view like:
select field1, field2, field3 from
(select field1, field2, field3, field4,field5 from
table1 and table where ----)view_name
The SQL inside the paranthesis is exacly same as the definition of the view whose name is also given in the SQL. Why is it required? Only the view name can be used or the whole SQL used to create the view can be used. But why both were used? May be to increase performance?
select field1, field2, field3 from
(select field1, field2, field3, field4,field5 from
table1 and table where ----)view_name
The SQL inside the paranthesis is exacly same as the definition of the view whose name is also given in the SQL. Why is it required? Only the view name can be used or the whole SQL used to create the view can be used. But why both were used? May be to increase performance?