DBCC 命令是存储过程还是函数?

Is DBCC command a stored procedure or a function?(DBCC 命令是存储过程还是函数?)
本文介绍了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 命令是存储过程还是函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)