Can store procedure call by user define function in SQL
server?
Answers were Sorted based on User's Feedback
Answer / ayanb1302@yahoo.com
Only functions and extended stored procedures can be
executed from within a function. You can't execute a normal
procedure from an UDF.
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / samba shiva reddy . m
sorry the last post was not correct.
yes we can call stored procedure in User defined function.
1.Stored procedures are pree compiled and functions are not pree compiled it will execute at run time.
2.Functions cannot affect the state of the database which means we cannot perform insert,delete,update and create operations on the database.
Stored Procedures can affect the state of the database by using insert,delete,update and create operations.
3.Procedure can return zero or n values whereas function can return one value which is mandatory.
4.Procedures can have input,output parameters for it whereas functions can have only input parameters.
5.Functions can be called from procedures and in select statement and whereas procedures cannot be called from function or select statement.
6.A Function returns 1 value only. Procedure can return
multiple values (max 1024).
7. Stored procedure returns always integer value by default
zero. Whereas function returns type could be scalar or
table or table values.
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / gajendra
No . B'cause Functions are extremely limited. They cannot
perform any operation in any way that can change data. This
means that you can't use dynamic sql or call other objects
(except functions)
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / samba shiva reddy . m
no we can not call as User defined function.
1.Stored procedures are pree compiled and functions are not pree compiled it will execute at run time.
2.Functions cannot affect the state of the database which means we cannot perform insert,delete,update and create operations on the database.
Stored Procedures can affect the state of the database by using insert,delete,update and create operations.
3.Procedure can return zero or n values whereas function can return one value which is mandatory.
4.Procedures can have input,output parameters for it whereas functions can have only input parameters.
5.Functions can be called from procedures and in select statement and whereas procedures cannot be called from function or select statement.
6.A Function returns 1 value only. Procedure can return
multiple values (max 1024).
7. Stored procedure returns always integer value by default
zero. Whereas function returns type could be scalar or
table or table values.
Is This Answer Correct ? | 3 Yes | 2 No |
yes it can call by user defined function
Is This Answer Correct ? | 4 Yes | 6 No |
Answer / anil sharma
Yes,It possible user define function can call store
procedure.
Is This Answer Correct ? | 3 Yes | 6 No |
Answer / alok maurya
yes it is done ,it can call by it,s name(store procedure name)
Is This Answer Correct ? | 6 Yes | 10 No |
i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution?
What is the new security features added in sql server 2016? : sql server security
Is truncate autocommit?
Does table partitioning improve performance?
How can windows applications connect to sql servers via odbc?
What does the INSTEAD OF trigger do?
What is indexing explain it with an example?
Describe the functionalities that views support.
How many types of schemas are there?
what is sql server? : Sql server database administration
What is cube dimension? : sql server analysis services, ssas
What is database replication?