Articles → SQL SERVER → Difference Between Views And Stored Procedure In SQL Server
Difference Between Views And Stored Procedure In SQL Server
Stored Procedure | Views |
---|
A stored procedure accepts parameters | A view does not accept parameters |
A stored procedure is not preferred as the building block for larger queries | A view is preferred as a building block for larger query |
A stored procedure can contain multiple statements like loops, if-else, etc. | A view can contain only one single select statement |
A stored procedure can perform modifications to one or more tables | A view cannot perform modifications to any table |