问题
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