Search code examples
sqlsql-server

Show create table tablename in SQL Server


In MySQL it is possible to do show create table tablename

What is the SQL Server equivalent?


Solution

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

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

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