无法在 SQL Server 2012 Management Studio 中使用 DESC 命令 [英] Not able to use DESC command in SQL Server 2012 Management Studio
问题描述
我有 SQL Server 2012 Management Studio.我正在尝试使用命令创建表.
I have SQL Server 2012 Management Studio. I am trying to create tables using commands.
创建表后,我尝试使用DESC
命令查看表结构但显示错误提示
After creating the table, I try to use the DESC
command to view the table structure but it shows error saying
关键字DESC"附近的语法不正确.
incorrect syntax near the keyword 'DESC'.
声明如下:
DESC doughnut_list;
推荐答案
你可以尝试这样使用它:-
You may try to use it like this:-
exec sp_columns doughnut_list
DESC 不是 SQL 命令,它在 Oracle 中使用.您也可以尝试检查 sp_columns
DESC is not an SQL command, it is used in Oracle. You may also try to check sp_columns
另外,如果你想查看表定义,你可以尝试使用这个:
Also if you want to view the table defintion you may try use this:
EXEC sp_help doughnut_list
或者可以使用快捷方式选择表格然后CTRL+F1键
or may be use a short cut by selecting the table and then CTRL+F1 key
附注:-
在 Sql Server 中,DESC 是 DESCending 的缩写.
In Sql Server DESC is the short form of DESCending.
在 Oracle 中,它是 DESCribe 的缩写.
In Oracle it is the short form of DESCribe.
这篇关于无法在 SQL Server 2012 Management Studio 中使用 DESC 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!