开发者

Difference between stored procedures and extended stored procedures

What is the basic difference between 开发者_Go百科SQL Server stored procedures (sp_) and extended stored procedures (xp_)? Why there are extended procedures anyway?


Extended stored procedures are written in c/c++(I believe anything that can create a DLL in native code), stored procedures are written in T-SQL

extended stored procedures exist because they allow you to do things that you cannot do in T-SQL like running DOS command (xp_cmdshell)

BTW do not name your procs starting with sp_..that is bad practice...see Don't start your procedures with SP_


An extended stored procedure executes code that is not SQL. It's normally written with external code like in C++.

Using Extended Stored Procedures

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜