Last post Jun 12, 2017 07:05 AM by wmec
Jun 12, 2017 03:15 AM|vinodkpasi|LINK
Why Stored Procedure not allowed inside Functions in SQL server?
Jun 12, 2017 04:53 AM|kaushalparik27|LINK
Functions are not allowed to do any data manipulation like insert, update, and stored procedure, and this is the rule. Only READ-ONLY database access in functions. If DML operations and stored procedure would be allowed in functions, then
functions and stored procedures would be pretty similar to . The way it is, a stored procedure can use a function, but not vice versa. Therefore, functions increase the "power" of stored procedures, queries and T-SQL scripts. UDF-s are also pitched as super-views.
Jun 12, 2017 07:05 AM|wmec|LINK
Functions cannot "touch" any database but read them only. Stored procedures can do anything and everything with databases.
You cannot execute a stored procedure from a function.
You can execute an extended stored procedure from a function.