문제

I have several tables in MySQL database and those tables are already filled;

Is there any way to get DML, which fills tables with same name, with exact same data?

for ex. if I have table (names) like this:

name_id : 1
name_val : john
name_id : 2
name_val : jack

I want to get this kind of DML :

Insert into table names(name_id,name_val) values(1,'john');
Insert into table names(name_id,name_val) values(2,'jackn');
도움이 되었습니까?

해결책

You can utilize mysqldump

To get only data use --no-create-info parameter

mysqldump -u user -p[password] --no-create-info --compact db_name table_name > dump.sql
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top