What is the difference between stored procedure and view?



What is the difference between stored procedure and view?..

Answer / Kumud Kinakar

Stored Procedures and Views serve different purposes in SQL: 1) A Stored Procedure contains a set of precompiled SQL statements, functions, and cursors that can be called by name. They do not represent any specific data in the database, but rather perform actions on the data. 2) A View is a virtual table based on a SELECT statement that does not modify any data but can be queried like a regular table. Views provide a way to present a subset or transformation of the data in the underlying tables.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Explain alias in sql?

1 Answers  


What is difference between pls_integer and integer?

1 Answers  


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

1 Answers  


what is definer rights invoke rights?

1 Answers  


how to drop an existing index in mysql? : Sql dba

1 Answers  


define data blocks ? : Sql dba

1 Answers  


What are all the different normalization?

1 Answers  


what are the type of locks ? : Sql dba

1 Answers  


what are the advantages of package?

7 Answers   iFlex,


How many sql commands are there?

1 Answers  


What are the qualities of 2nf?

1 Answers  


I need to write a simple query,which one is better select statement or stored procedure?and why?

2 Answers   iGate,


Categories