Generate table DDL via query on MySQL and SQL Server

十年热恋 提交于 2019-12-03 09:28:15

it's mysql-specific, but SHOW CREATE TABLE gives you the DDL for a table.

Squirrel

You have to create that yourself.

You can query INFORMATION_SCHEMA.COLUMNS for the column name and data type.

Joel Coehoorn

You can't get the the CREATE Table text in a cross platform way, but you can get enough information to build it yourself from the INFORMATION_SCHEMA views.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!