Find the best answer to your question, help others answer theirs

If you are going to use a passage of Lorem Ipsum, you need to be sure there
isn't anything embarrassing hidden in the middle of text.

  • Anybody can ask a question
  • Anybody can answer
  • The best answers are voted up and rise to the top

1 Answer

2
  • In Procedure parameter as IN, OUT & INOUT used but for a function always IN parameter works.
  • A FUNCTION is always returns a value using the return statement. PROCEDURE may return one or more values through parameters or may not return at all.
  • Functions are normally used for computations where as procedures are normally used for executing business logic.
  • A Function returns 1 value only. Procedure can return multiple values (max 1024).
  • Stored procedure returns always integer value by default zero. Whereas function returns type could be scalar or table or table values.
  • Stored procedure is precompiled execution plan where as functions are not.
  • A function can call directly by SQL statement like select func_name from dual while procedure cannot.
  • Stored procedure has the security and reduces the network traffic and also we can call stored procedure in any no. of applications at a time.
  • A Function can be used in the SQL Queries while a procedure cannot be used in SQL queries .that cause a major difference b/w function and procedures.
Edit
avatar
Majed Badawi
15.5k 3 10 26
answered 8 hours ago

Leave a Comment

[named hyperlinks] (https://example.com)
**bold**
_italic_

Your Answer

Drop files here or click to upload.