SQL中函数和过程的区别 [英] Difference between function and procedure in SQL

查看:54
本文介绍了SQL中函数和过程的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



早上好,



我需要知道功能和SQL中的程序。



每次面试时都会问这个问题。但我很困惑地回答。



你可以解释一下吗。





谢谢



Arul R

Hi Friends,

Good morning,

I need to know the difference between function and procedure in SQL.

every time in interview asked this questions.but I confused to answer.

Can u pls any one explain about it.


Thanks

Arul R

推荐答案

参考文章:

存储过程和功能之间的差异 [ ^ ]


Functions
----------
1) can be used with Select statement
2) Not returning output parameter but returns Table variables
3) You can join UDF
4) Cannot be used to change server configuration
5) Cannot be used with XML FOR clause
6) Cannot have transaction within function

Stored Procedure
-----------------
1) have to use EXEC or EXECUTE
2) return output parameter
3) can create table but won’t return Table Variables
4) you can not join SP
5) can be used to change server configuration
6) can be used with XML FOR Clause
7) can have transaction within SP


请查看以下链接:

程序之间的差异和功能 [ ^ ]

存储过程和函数之间有什么区别? [ ^ ]

存储过程和函数之间的差异 [ ^ ]

功能和程序之间的差异 [ ^ ]







我不认为你早先用Google搜索所以,让我 Google [ ^ ]适合你。



希望它有所帮助。
Check these links below:
Differences Between Procedures and Functions[^]
What are the Differences Between Stored Procedures and Functions?[^]
Differences between Stored Procedures and Functions[^]
Difference Between function and Procedure[^]

And

I don''t think you Googled this earlier So Let me Google[^] that for you.

Hope it Helped.


这篇关于SQL中函数和过程的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆