Thursday, February 23, 2012

Compare Stored Procdure and Views?

Stored Procedure,  View both can return the data from tables.
Stored Procedure can return scalar values as output parameters , views can not.
Stored Procedure can be parametrized whereas views can not be. (there is workaround for
parametrized views , but with certain limitations.)

Both hide the database structure from the user and provides the security.

Views can be indexed, Stored Procedures can not be.

Stored Procedures are better than views in performance, particularly on large tables.

No comments:

Post a Comment