| |
GeekInterview.com > Interview Questions > Database
| Print | |
Question: What is the difference between a stored procedure and a view? why do we use views from SQL Server point of view? What are mutating triggers? How is the structure of a bit map index, clustered, Non clustered and B Tree What re mutating triggers? Can a stored procedure a record set? Can we use DTS on a client machine to schedule jobs and consolidate data to a sql tables? Can we have an update trigger within another update trigger?
|
| May 05, 2007 09:25:23 |
#3 |
| vibha_kant |
Member Since: May 2007 Total Comments: 5 |
RE: What is the difference between a stored procedure ... |
Difference between a stored procedure and view:
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 :-) |
| |
Back To Question | |