Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 difference between UDF and Stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-10 : 08:19:10
vishwanath.G writes "Hi all

I have used UDF extensivily in my development environment, but still I would like to know wether the UDF is a compiled peace of code like Stored procedure are not?


I would like to know even I have used certain function as table valued functions for return columns
I have one question, which will perform by using the function or direct Sql statement for the columns


ex
dbo.fn_ITemDetails(ItemID)
ASSUME ITEMID = 10
select ItemName,MRP,UOM from dbo.fn_ITemDetails(10)
or
select ItemName,MRP,UOM from Ite Master where ITEMiD = 10

which one will perform better please let me know


thanks"

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-10 : 08:35:11
As regards to your first question, answer is yes.

Answer to your second question depends on the contents of the table-valued function you are using. Post it here and we can get some understanding about it.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page
   

- Advertisement -