what is difference between procedure and function

Answer Posted / subhendu

Functions called from SQL have special restrictions:

Accept only IN parameters
cannot contain DML
cannot contain DDL - implies COMMIT
Accept and return only SQL datatypes (not PL/SQL
specific datatypes)
Must use positional notation
Must own or have EXECUTE privilege
Cannot contain transactional or session control
statements (eg. COMMIT, ROLLBACK, ALTER)

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain correlated query work?

809


What are the different sql commands?

746


Can we use ddl statements in stored procedure?

904


What are the built in functions of sql?

775


What is a sql statement?

710


What are sql commands?

714


List the various privileges that a user can grant to another user?

793


What is the sql query to display the current date?

785


how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba

873


What is the example of procedure?

703


What is the size of partition table?

768


How can use stored procedures in sql?

811


how to use myisamchk to check or repair myisam tables? : Sql dba

729


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.

1856


How are sql commands classified?

822