MySQL 在 SQL Server 中显示创建表表名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3526982/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 16:54:51  来源:igfitidea点击:

Show create table tablename in SQL Server

sqlmysqlsql-server

提问by l--''''''---------''''''''''''

In MySQL it is possible to do show create table tablename

在 MySQL 中可以这样做 show create table tablename

What is the SQL Server equivalent?

什么是 SQL Server 等价物?

回答by Will A

In SSMS, right-click on the table node and "Script Table As" / "Create".

在 SSMS 中,右键单击表节点和“脚本表为”/“创建”。

There is no built in 'script this table' T-SQL.

没有内置的“脚本此表”T-SQL。

sp_help 'tablename' gives useful table information if that'd do.

如果这样做, sp_help 'tablename' 会提供有用的表信息。

回答by Danniel Little

One that might be close:

一个可能接近的:

exec sp_columns YourTableName