Answers were Sorted based on User's Feedback
Answer / vinay dixit
please find the advantages as given below :-
a) data security - no need to give permission on the table,
infact a view can be created, having only selected number
of coloums in its definition. So user will only be able to
see those coloums.
b) simplicity - a very complicated query can be saved as a
view defenition. when needed can be called by its view name.
c) removes dependency - Can be very helpful to remove the
dependecny from the underlying tables. Suppose a view is
created by joining several tables. After some time, there
are some changes on the tables, so only defenition of view
can be changed and there is no need to change all the code
where view is used.
d) No space - takes no space ( except materialized view )
|Is This Answer Correct ?||60 Yes||4 No|
Answer / anil_abbireddy
1. data security : complex view can not be modified ie.
base tables cannot be visible.
2. it provides easy way to query data from different data
sources like a single table
3.it is very usefull when developing complex reports basing
on multiple tables.
|Is This Answer Correct ?||38 Yes||4 No|
Answer / pnc
view is a logical presentation of one or more tables. It is
a virtual table. or A view is a data base object to register
the select statement permanently in the data base.
|Is This Answer Correct ?||17 Yes||6 No|
Answer / karunakarreddy.boyapally
1) it reduse the object size
2) hides the complexity of data
3) security purpose also
|Is This Answer Correct ?||12 Yes||3 No|
Answer / kapil syscom
View is simple structure as table in database, it dosen't take extra memory space, and reduces the structural complexity of database whenever we need to fetch the data from more than one table, thus it reduces the cost of joins every time.
Thus these is true that we have to use it for efficiency reasons..
|Is This Answer Correct ?||5 Yes||5 No|
Types of joins?
Can you have multiple SPs with the same name on a database?
how to insert values like 10:10:00,30:25:00 etc.into table after insert how can i sum the above insert values to get the result as 40:35:00
How do you retrieve the last N records from a table?
how to write utl file pkg in SQL
How would you hide a table in sql. ie the table can be only visible to its maker?
Which one is the Best approach to put code, among Triggers and Procedures? Explain?
table name :Tab fields name 1.trx_no (pk) 2.trx_date 3.account code (7 char) 4.account type (1 char) 5.amt Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit . write a query to display the account code wise total debit and credit bal for the month of april 2004. write a query to display account code wise new amt credit for the april 2004
If we update a complex view, is base table will get update ?
Store procedure will return a value?
how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.
i have xml source. xml source having lacks of records. i want extract/retrive xml source data using sql query. please tell me how to write query.