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.
In my previous article I have given details about application support engineer day to day…
In my previous articles I have given the roles and responsibilities of L1,L2 and L3…
In my previous articles i have given the hierarchy of production support in real company…
In this article i would like to provide information about production support organization structure or…
In my previous article I have given roles for L1 and L2 support engineer with…
I have started this new series of how to become application support engineer. This article…