Difference between Stored Procedure and View in SQL Server.


Stored Procedure

  • Stored Procedure can have multiple select statement
  • Stored Procedure can have parameters
  • Stored Procedure¬†exists in database
  • Stored procedure¬†return predefined result

View

  • View can have only one select statement
  • View does not have any parameter
  • View are virtual and does not exists in database
  • Views can return different result¬†based on where condition.

2 thoughts on “Difference between Stored Procedure and View in SQL Server.

  1. PaulW

    Another key difference is the results of a view can be selected or joined, the resultset from a stored proc cannot.

  2. German

    Stored Procedure does data modification
    View cannot modify data and DML is forbidden when you define the view

Comments are closed.