In my previous article i have given the difference between simple view and complex view in SQL. In this article i would like to throw light on what is mean by complex view in SQL and what are its different examples. If you faced the interviews like SQL interviews you faced this question about what is mean by complex view in SQL.
What will you find in this article?
1.What is mean by view in SQL and its types?
2.What is Complex view in SQL with real example.
The view is nothing but the snapshot of the database. If we want specific data from single table or multiple tables which needs to be used again and again then the views are useful. You can say in simple words view in SQL is nothing but the logical table created from one or more tables. There are multiple usages of views in SQL like reporting purpose or if we want to fetch the logical data from multiple table again and again then we can create the view.
There are two types of views in SQL :
In this section I would like to explain about complex view in SQL with real life example.
Real life example of Complex view in SQL :
If there are two tables Customer table and Items table and I want to prepare the report where Customer bought the items .
1.Customer :-Customer_name, Customer_num, Customer_code columns
2.Item:-Customer_code,Item_code,Item_name,Item_category columns
We need to create view where we want to show the associated Items to Customer.Here We need to use complex join.
Create view V_Customer
as Select e.Customer_name,d.Item_name
from Customer e,Item d
where e.Customer_code=d.customer_code
Group by item_category;
The above view will give you the details about the Customer_name and associated item with customer group by the item category. So this kind of view is called as complex view.
Introduction Cryptocurrencies took the world by storm, setting up a new financial system and breaking…
In my previous article I have given Top 20 technical support interview questions with its…
In my previous articles I have given 15 most asked desktop support interview questions with…
A business analyst is someone who is versed in processes of data analysis used for…
In my previous article I have already given top questions and answers for Desktop support…
In my previous article I have given unix production support interview questions and answers. In…