Question: what is difference between function and trigger?
Answer: Functions can be used in select or update or delete statement. Trigger gets automatically executed when insert update or delete is fired on a table. It is a type of stored procedure invoked automatically for a predefined DML operation . cannot accept parameters.