- Function always have a returns value where as procedure does not have a return value, but you can use OUT parameter for this purpose.
- Function can be used in SELECT statement where as procedure can not. eg. SELECT GetName(v_id) FROM DUAL;
- You can have DML(Insert, Update, Delete) DDL(TRUNCATE, Drop), TCL(COMMIT, ROLLBACK) in a function but then you can not call that function in any SQL query.
No comments:
Post a Comment