Why do we create stored procedures & functions in pl/sql and how are they different?



Why do we create stored procedures & functions in pl/sql and how are they different?..

Answer / Mohan Singh

"We create stored procedures and functions in PL/SQL to reuse code, encapsulate logic, and improve performance. A stored procedure is a collection of SQL statements that performs a specific task when executed. It can accept input parameters, return output values, and perform side effects on the database. On the other hand, a function returns a value after executing a set of SQL statements, without performing any side effects on the database."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Explain aggregate functions are available there in sql?

1 Answers  


What is the maximum rows in csv?

1 Answers  


What is number function in sql?

1 Answers  


What does the hierarchical profiler does?

1 Answers  


Is foreign key mandatory?

1 Answers  


What is the purpose of my sql?

1 Answers  


How can I get the number of records affected by a stored procedure?

1 Answers  


What is the purpose of normalization?

1 Answers  


What port does sql server use?

1 Answers  


How can we make an if statement within a select statement?

1 Answers  


Can %notfound return null after a fetch?

1 Answers  


What is nosql example?

1 Answers  


Categories