Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench - where is the duplicate table command in the menu?

I try use mysql workbench for windows and can not find command in context menu duplicate table.

Anyone can say where this command?

like image 204
Leo Loki Avatar asked Sep 08 '25 18:09

Leo Loki


2 Answers

There is no such command to duplicate a table in the SQL IDE. You can manually run create table like and then copy the content over. In modeling you can instead copy a table figure to clipboard and paste it back into the diagram. MySQL Workbench will then ask you if you want to duplicate the object (as it exists already there).

like image 168
Mike Lischke Avatar answered Sep 11 '25 17:09

Mike Lischke


Using below first you will be able to Duplicate Table Schema including index and than secondly you will populate data from old table.

create table bkpname like tblname;
INSERT bkpname SELECT * FROM tblname;
like image 31
Patel Nikhil Avatar answered Sep 11 '25 16:09

Patel Nikhil