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.
| Author |
Topic |
|
Hamster
Starting Member
2 Posts |
Posted - 2002-05-17 : 02:53:03
|
| What is the different between Store Procedure and User Define Function ? I had create a Store Procedure Example: ----------- CREATE PROCEDURE sp_ViewAllUser_param @UserName varchar(50) AS Select * from v_User where UserName = @UserName GO Example for Function: --------------------- CREATE FUNCTION UserDetail (@UserName varchar) RETURNS Table AS Return(Select * from v_User where UserName = @UserName) Can someone tell me why I should use Function instead of Store Procedure? Thank You ! |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
|
|
|
|
|