Page 1 of 1

showing the query in the phpmyadmin

PostPosted: 24. March 2021 09:02
by dotKer
Using phpmyadmin, I click a table named 'table1', it shows the following SQL.
SELECT * FROM `table1`

I click the button "TABLE WORK" on the top menu and I enter a new name "table2" and click the EXE button of rename,
then, it shows the following SQL.
RENAME TABLE `dbName1`.`table1` TO `dbName1`.`table2`;

However, when I enter a new name "table3" and click the EXE button of copy, it doesn't show any SQL.
I don't know why it doesn't shows any SQL.

I like to see the SQL of copying a table.

Can I make the phpmyadmin to show the SQL when I make a copy of a table with your help?

By the way the button names, i.e, TABLE WORK, EXE, are translation to English from my mother tongue.

Re: showing the query in the phpmyadmin

PostPosted: 24. March 2021 15:18
by Altrea
The reason why phpmyadmin shows the syntax for renaming a table but not for copying it is because it is programmed this way.
Phpmyadmin shows only syntax for easy one statement operations. If a statement is more complicated, phpmyadmin will almost never show you the syntax.

But Google is your friend. You will find many examples how to copy a mysql/mariadb table, like here: https://stackoverflow.com/a/3280042