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 |
Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot?
What is the maximum size of sql server database?
Explain the difference between functions and stored procedures in sql server?
what is the difference between Delete and Truncate
4 Answers CarrizalSoft Technologies, Geo Research Centre,
How many types of Joins in SQL Server 2005?
9 Answers CarrizalSoft Technologies, HCL,
What do you understand by recursive stored procedures?
hi to all teachers,... Friends who write in the query mode Full text Search in Sql Server have experience Who make(Convert) this Stored Procedure as a normal Full text Search, which contains and .. Is used, into Advance of the tips I have thanked all friends perfection. Email : rezaafandi@yahoo.com Create PROCEDURE Sp_student @fname varchar(50), @lname varchar(50), @tel varchar(50), @code varchar(50), @adr varchar(50), @search_operation varchar(50), @totalRowCount bigint output AS begin if @search_operation = 'and' begin SELECT f3,f4,f5,f6,f7 FROM tb_student WHERE( f5 like '%' + @fname + '%' and f4 like '%' + @lname + '%' and f6 like '%' + @tel + '%' and f7 like '%' + @code + '%' and f3 like '%' + @adr +'%' ) select @totalRowCount = @@rowcount end
What are the advantages of user defined function?
Following are some of the question related to below mentioned query? select e1.salary from employee3 e1 where 2= ( select count(distinct(e2.salary)) from employee3 e2 where e2.salary>=e1.salary ) 1) What the query returns? 2) How it works? - Detail explanation (what the sub query does, why it is (where 2=)....etc...Please?
What is the purpose of sql profiler in sql server?
what happens on checkpoint? : Sql server database administration
Using the customer, and order table in northwind database, please write a query to produce xml?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)