sqldump/Export table schema/ddl with/without data Follow
Is there any way to export a table definition to an sql file or to another server?
Another program that I use has an export function which allows me to do this with or without data and is great for making quick and dirty backups or moving a copy of a table into a test environment.
Trying to see if I can duplicate this behavior from DataGrip, it's the only reason I have to launch the other editor.
I know I can copy the SQL statements as insert or update, but this is missing the table create statement which turns this into a two step process.
Please sign in to leave a comment.
You can generate table's DDL, either from Database tool window when viewing the table or when working with table in a Table Editor's DDL tab.
There is no yet single action for a compete Database dump, though, please vote and follow: https://youtrack.jetbrains.com/issue/DBE-1383
The link you provided is not working, i want to vote for this issue, please point me to the updated issue link. Thanks
Hi, the link you posted here does not exist, please update the link, so we can vote
Depending on the schema, the DDL cannot be exported and then executed verbatim to create a fresh one as constraints reference tables which are created later in the script execution. Constraints need to be added as ALTER statements at the end of the DDL script once all tables have been created.
Also, it appears as though copying the DDL to clipboard actually copies the entire DDL twice, resulting in duplicate create table statements when pasted into an editor.