I'm using a MySql database with a Java program, now I want to give the program to somebody else.
How to export the MySql database structure without the data in it, just the structure?
I'm using a MySql database with a Java program, now I want to give the program to somebody else.
How to export the MySql database structure without the data in it, just the structure?
You can do with the
--no-data
option with mysqldump commandIn case you are using IntelliJ you can enable the Database view (View -> Tools Window -> Database)
Inside that view connect to your database. Then you can rightclick the database and select "Copy DDL". Other IDEs may offer a similar function.
Dumping without using output.
Yes, you can use
mysqldump
with the--no-data
option:To get an individual table's creation script:
- select all the table (with shift key)
- just right click on the table name and click Copy to Clipboard > Create Statement.
You can take using the following method
Hope it will helps you