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
精彩评论