ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
What is the difference between views and stored procedures?
Can we have input parameters for views?
 Question Submitted By :: Preeti
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between views and stored procedures? Can we have input parameters for views?
Answer
# 1
Well both of them aren't even compatible to compare and 
tell the difference. They both belong to different paradigm 
of database world. Anyways, here are the definitions I 
would give you. A stored procedure is a set of sql 
statements which can be called a subroutine to access 
relational database systems. Its actually stored in a 
daatabase. They are mainly used for faster access(Pre-
compilation of SQL statements) ,Simplification of data 
management and for security.

A view as my friends have elucidated above is a virtual or 
logical table that holds result set of a pre-defined query. 
The data for these views are not stored in the database. 
There are two types of view read only and updatable. You 
can modify a read only view with an INSTEAD OF trigger.

Hope that makes sense :-)
 
Is This Answer Correct ?    2 Yes 3 No
Chandana Sriram
 
  Re: What is the difference between views and stored procedures? Can we have input parameters for views?
Answer
# 2
both can never be compares, as both have totally different
approached,

Well a view is a output of a query ,and makes a virtual
image of the table,and the input parameters are not accepted.

sp is a group of sql statements that are pre-executed and it
accepts the parameters.it reduces network traffic, gives
faster performance, etc.
 
Is This Answer Correct ?    6 Yes 0 No
Ashutosh Jha
 
 
 
  Re: What is the difference between views and stored procedures? Can we have input parameters for views?
Answer
# 3
views & stored procedure are basically different appraches.
both have their different purposes.
 view is  a virtual table. which have no data atall.which 
difination stored in oracle system catalogue . whenever  a 
call is made  every time the defination is scanned & a new 
virtual table is made over the base table.
  while stored procedure are the precompiled statements 
which can accept arguments..
 
Is This Answer Correct ?    2 Yes 1 No
Grish Varshney
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
About types of indexes in SQL server ? Cognizent1
What value could be assigned to Varchar Type?  3
Can I know,how to Execute Funcion and Trigger through command(Manualy Execution) in MS SQL/SERVER 2005,give me answer with Example.  1
what is replication? where do u use Go Keyword? Satyam1
what is advantages in sql 2005 over sql 2000?  4
What is the difference between OLEDB and ODBC CFCI3
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? Yardi-Software4
how to select 5 to 7 rows from a table, which contains 10 rows? IBM14
What is the difference between a Local temporary table and a Global temporary table? How is each one used?  1
if we have a column (Key) in a table. and values of that column is Key 1 1 1 2 2 3 3 4 4 5 5 5 and we want to show the data after query..like.. 1(3) 2(3) 3(2) 4(2) 5(3) how many times a single term comes.. Rolta5
Can we create clustered index on non primary key column CTS14
What is the diff between Static Queries and Dynamic queries give me some examples CSC1
1.How to check the backup file details if we do not have access to that folder 2.how to check the backup file size without connecting to the folder IBM1
What is indexed views? plz explain with example?  1
How To Make password Protected SQL Server 2005 Database i.e when i open SQL Server database then ask for password.  1
How do I list the available tables in a database I'm querying?  3
What do you mean by COLLATION?  4
one table has four field id,name,design,salary. i have to find maximum salary .  6
Explain Trigger with an example?  1
Can Somebody tell me the difference between Clustered & Non- Clustered Index?? Progressive3
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com