What is the difference between views and stored procedures?
Can we have input parameters for views?

Answer Posted / chandana sriram

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 ?    20 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of normalization?

545


What are points to remember while using the fillfactor argument?

524


What is database replication?

572


What is partitioned view?

517


What is the latest version of microsoft sql server?

478






What does indexation mean?

522


How do I view a trc file?

495


How to view existing indexes on an given table using sys.indexes?

592


What are the system database in sql server 2008?

571


Do you know spatial data types - geometry and geography in sql server 2008?

572


You are doing log shipping due to some reasons it is failing. How you will proceed from there

1545


Can we insert data if clustered index is disabled?

504


Explain cross join or cartesian product in sql?

538


Tell me about pre-defined functions of sql?

687


What is merge join?

568