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;
select
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