Is it possible to print out a CREATE script for a table?
Among other small goodies, I really miss the CREATE Script feature in pgAdmin, that displays the CREATE query for existing tables, views, pretty much everything. DataGrip let's you modify objects with GUI, but it'll be handy to be able to directly edit the CREATE script instead. Is it possible to print out the create query for an existing table?
Please sign in to leave a comment.
Hello Nick,
From the table context menu please use Copy DDL action to copy DDL of a table to clipboard or Table Editor action to open the Table Editor View and then use switch to DDL tab to view the table definition as SQL script:
Andrey, thanks, but when I use Copy DDL from a view it copies a CREATE TABLE query to the clipboard, while I'm expecting at least CREATE VIEW. It's kinda strange. Is it a bug?
Indeed there is an issue with the views: https://youtrack.jetbrains.com/issue/DBE-2076
this doesn't work, either. It just generates an empty create statement, with no column definitions, so, pretty much worthless.
William Hatch,
Could you provide a sample to reproduce empty create statement generation?