I've only seen questions where to create just the database from workbench for MYSQL.

on SQL SERVER we can create the table script and with all the inserts with all the data.

is there a way I can't do it on mysql workbench?

a table got dropped from an environment by mistake, and I'm trying to grab the same table from the other environment.

I'm did everything I could but for now I just can select * and copy the data on excel and prepare all the "INSERT INTO..."

1 Answer 1


@RacerSQL, I didn't quite get your question but I've tried on my understanding let me know if this answer your question or not.

SET group_concat_max_len = 15000;
concat ("insert into ","myTable(", group_concat( distinct column_name),") values (", "select ",group_concat(distinct column_name)," from TableName",")") AS DemoQuery
from information_schema.columns 
where table_name = 'TableName'

Before this query you can generate a create table script and after that you can execute this one

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.