DBeaver export table structure, data

Environment: win10, DBeaver 22.0.0

Background: The environment is relatively special. It is necessary to import the table structure and data to another database. The mysql command cannot be used. Consider the function of DBeaver to realize it.

Export and import of table structure:

After a search, I couldn't find the export table structure at all, so I tried it myself, maybe there is no such function, but I can find the statement to create the table, as follows:

Select the table to be exported - generate SQL - DDL, and the SQL statement to create the table will appear.

With the table creation statement, the next step is to use the sql statement to create the table in another database.

Double-click the database you want to import the table into, and then click SQL, as shown below:

The following picture appears:

Put the previously copied sql statement into it and execute it

Note: The character set of the library and the table, and whether there are foreign keys in the table structure, etc., otherwise there will be problems with SQL statement execution errors

Export of data in the table:

This is just one of the ways, I didn't know this way before, this time blog as a kind of note for yourself! ! !

Double-click the table, click the data, place the cursor in the displayed data, right-click, select export result set, select the export format, and continue to the next step.

Select the generated format, such as: sql, csv, txt, etc.

Extract settings

output format

Output configuration export parameters, click to continue

The generated sql file, the content of the file is the sql insert statement

document content:

at last

I know that most junior and middle-level Java engineers want to improve their skills, and they often try to grow by themselves or enroll in classes. However, the tuition fees of nearly 10,000 yuan for training institutions are really stressful. The effect of self-study is inefficient and long, and it is easy to hit the ceiling and stagnate in technology!

Therefore, I collected and sorted out a " Complete Set of Learning Materials for Java Development " and gave it to everyone. The original intention is also very simple, that is, I hope to help friends who want to learn and improve themselves but don't know where to start, and at the same time reduce everyone's burden.

The editor has encrypted: aHR0cHM6Ly9kb2NzLnFxLmNvbS9kb2MvRFVrVm9aSGxQZUVsTlkwUnc==For security reasons, we have encoded the website through base64, and you can decode the URL through base64.

Guess you like

Origin blog.csdn.net/m0_67265464/article/details/126801695