Is DBCC command a stored procedure or a function?

谁说我不能喝 提交于 2019-12-11 03:38:56

问题


What should be the DBCC commands be called ? DBCC procedure or DBCC function?

It is confusing because DBCC PAGE could be executed without prefixing a EXEC statement much like stored procedures. But EXEC DBCC PAGE(1,1,1,3) throws an error

Syntax error - Msg 156 Incorrect syntax near the keyword 'DBCC'

And it isn't a function because function calling must be made in SELECT, but

SELECT DBCC PAGE(1,1,1,3)

shows the same error.


回答1:


As far as I know DBCC stands for Data-Base-Console-Command. Therefore, DBCC by its self is neither a procedure nor a function. It is simply a console that you recall.



来源:https://stackoverflow.com/questions/57426934/is-dbcc-command-a-stored-procedure-or-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!