0

What is the difference between Stored Procedure and UDF. T

1. Difference between Stored Procedure and UDF having same query. i.e.

SP BEGIN SELECT * FROM Customer END

Function Return Select * FROM Customer

2. What is the difference between

`select * from emp, dept where emp.DeptId = dept.DeptId`

select * from emp inner join dept on emp.DeptId = dept.DeptId

Shantanu Gupta
  • 20,688
  • 54
  • 182
  • 286

2 Answers2

0

1. http://www.go4expert.com/forums/showthread.php?t=329
2. There's no difference, maybe on performance.
The second style is the old fashion Join. For old Fashion outer join they used +, select * from emp, dept where +emp.DeptId = dept.DeptId, Oracle now say it's deprecated.

Cosmin Cosmin
  • 1,526
  • 1
  • 16
  • 34
0

For the 2nd one, see SQL JOIN: is there a difference between USING, ON or WHERE?. Basically, one is "old style" "JOIN-in-the WHERE". Using explicit JOIN is preferred and is a later ANSI standard

For stored proc vs udf, there are a lot of answers under "related" on the right hand side of this page...

Community
  • 1
  • 1
gbn
  • 422,506
  • 82
  • 585
  • 676