Can store procedure call by user define function in SQL
server?

Answers were Sorted based on User's Feedback



Can store procedure call by user define function in SQL server?..

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

Can store procedure call by user define function in SQL server?..

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

Can store procedure call by user define function in SQL server?..

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

Can store procedure call by user define function in SQL server?..

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

Can store procedure call by user define function in SQL server?..

Answer / raju

yes
usig
exec <procname> <paramiter list>

Is This Answer Correct ?    2 Yes 2 No

Can store procedure call by user define function in SQL server?..

Answer / ashish tripathi

yes it can call by user defined function

Is This Answer Correct ?    4 Yes 6 No

Can store procedure call by user define function in SQL server?..

Answer / sushma

Yes, we can do

Is This Answer Correct ?    0 Yes 2 No

Can store procedure call by user define function in SQL server?..

Answer / anil sharma

Yes,It possible user define function can call store
procedure.

Is This Answer Correct ?    3 Yes 6 No

Can store procedure call by user define function in SQL server?..

Answer / raja

it's possible

Is This Answer Correct ?    5 Yes 9 No

Can store procedure call by user define function in SQL server?..

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

Post New Answer

More SQL Server Interview Questions

About DTS usage ?

2 Answers   Cognizant, Wipro,


What types of integrity are enforced by a foreign-key constraint

1 Answers  


What is multi-statement table-value user-defined function?

0 Answers  


How to perfor If the table running time is taking 2hours and table is having 10 rows in it?

1 Answers  


Can you explain what is the use of custom fields in report?

0 Answers  






How can sql server instances be hidden? : sql server security

0 Answers  


Where can you add custom error messages to sql server?

0 Answers  


how to find 6th highest salary

0 Answers   Chetak Logistics,


Explain sql server service broker?

0 Answers  


Ek lifafa 10 noto se bhara hai usme 2 or 5 ke note nahi hai aur usme total 50Rs hai, to batao lifafe me kon se not kitne hia it’s a challenge thank’s

6 Answers   Broadridge,


What are the different methods available under sqlcommand class to access the data?

0 Answers   UGC Corporation,


How to get the definition of a user defined function back?

0 Answers  


Categories