showing the query in the phpmyadmin

Problems with the Windows version of XAMPP, questions, comments, and anything related.

showing the query in the phpmyadmin

Postby dotKer » 24. March 2021 09:02

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.
dotKer
 
Posts: 40
Joined: 09. November 2020 13:28
XAMPP version: 7.4.11
Operating System: windows

Re: showing the query in the phpmyadmin

Postby Altrea » 24. March 2021 15:18

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 138 guests