DBCC 命令是存储过程还是函数? [英] Is DBCC command a stored procedure or a function?

查看:51
本文介绍了DBCC 命令是存储过程还是函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DBCC 命令应该叫什么?DBCC 过程还是 DBCC 函数?

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

这是令人困惑的,因为DBCC PAGE 可以在没有前缀EXEC 语句的情况下执行,很像存储过程.但是 EXEC DBCC PAGE(1,1,1,3) 抛出错误

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

语法错误 - 关键字 'DBCC' 附近的 Msg 156 语法不正确

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

它不是函数,因为函数调用必须在SELECT中进行,而是

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

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

显示相同的错误.

推荐答案

据我所知,DBCC 代表 Data-Base-Console-Command.因此,DBCC 本身既不是过程也不是函数.它只是一个你回想起来的控制台.

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.

这篇关于DBCC 命令是存储过程还是函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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