Last answered:

23 Nov 2022

Posted on:

21 Nov 2022

2

Resolved: View Vs Stored procedure

What is the difference between views and stored procedures ?

2 answers ( 2 marked as helpful)
Posted on:

21 Nov 2022

0

In Views We Create New Table View/Structure from Existing Table
(only important rows that we need most)
While Store Procedure is for
A Query that we need again and again so we create procedure to make our work Easy .
just by call we can run that long query easily

Instructor
Posted on:

23 Nov 2022

3

Hi Nacereddine and Ramesh!
Thanks for reaching out.

@: Nacereddine
Thanks for sharing this piece of information with the Community!

@: Ramesh
A view is intended to be regarded similarly to a table, it gives an overview of combination of data from different tables. A routine can also include different operations than just reading data, it could also be used for other CRUD operations like insertion, updating or deleting data. You cannot do that with a view.  A view represents a virtual table. You can join multiple tables in a view and use the view to present the data as if the data were coming from a single table.
A stored procedure uses parameters to do a function. It can be updating and inserting data, or returning single values or data sets.

Hope this helps.
Best,
Tsvetelin

Submit an answer