Home About US Matrimonial Education Recipis Inquiry Contact US
USER ID PASSWORD
New Member Forget Password
 
Member
24 Gaam
Hospital Project
School Project
Vibrant Newsletter
Events / News
Essay
Entertament
Services
Business
Health
Religion
Arts / Calture
Other Samaj
Help
 
 
  EDUCATION
   
 
Education :- Computer :- SQL TUTORIAL :- Views


In SQL, you might (check your DBA) have access to create views for yourself. What a view does is to allow you to assign the results of a query to a new, personal table, that you can use in other queries, where this new table is given the view name in your FROM clause. When you access a view, the query that is defined in your view creation statement is performed (generally), and the results of that query look just like another table in the query that you wrote invoking the view. For example, to create a view:

CREATE VIEW ANTVIEW AS SELECT ITEMDESIRED FROM ORDERS;

Now, write a query using this view as a table, where the table is just a listing of all Items Desired from the Orders table:

SELECT SELLERID
FROM ANTIQUES, ANTVIEW
WHERE ITEMDESIRED = ITEM;

This query shows all SellerID's from the Antiques table where the Item in that table happens to appear in the Antview view, which is just all of the Items Desired in the Orders table. The listing is generated by going through the Antique Items one-by-one until there's a match with the Antview view. Views can be used to restrict database access, as well as, in this case, simplify a complex query.

 

 
 
 
 
 
 
 
 
Site Design By :- www.ebeesinfo.com
Site Best View in 1024 X 768
Home | About US | Terms and conditions | Education | Matrimonial | Resipis | Inquiry | Contact US
Copy Right 2008, www.24gaam.com