Running SQL queries on a database with phpMyAdmin

phpMyAdmin series

9. Running SQL queries on a database with phpMyAdmin

This tutorial assumes you've already logged in to phpMyAdmin

Now let's learn how to run SQL queries on a database

Click the database table you wish to run a SQL query on
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

As demonstrated in another tutorial, you can delete (or drop) a field from a table by selecting it here then clicking the drop icon here
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

In this tutorial however, let's demonstrate how to delete this address field using pure SQL commands

Click the SQL button here
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

Then type the SQL command to delete the address field from the details table. Click Go when finished
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

That's it! the SQL command has been executed. Let's go take a look

The address field is no longer in our details table
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

You can also click the SQL button directly from the table view (instead of from the database view which is what we did).....

..... doing so presents a SQL query window that is partially filled in
FutureHosting Best Hosting in Ireland - Running SQL queries on a database with phpMyAdmin

For more information on learning about SQL query syntax, visit the MySQL documentation available here

This is the end of the tutorial. You now know how to run SQL queries on a database using phpMyAdmin

Ця відповідь Вам допомогла?

 Роздрукувати цю статтю

Також прочитайте

Importing databases and tables with phpMyAdmin

phpMyAdmin series 8. Importing databases and tables with phpMyAdmin This tutorial assumes...

Renaming database tables with phpMyAdmin

phpMyAdmin series 10. Renaming database tables with phpMyAdmin This tutorial assumes you've...

Deleting fields from database tables with phpMyAdmin

phpMyAdmin series 6. Deleting fields from database tables with phpMyAdmin This tutorial assumes...

Inserting fields into database tables with phpMyAdmin

phpMyAdmin series 4. Inserting fields into database tables with phpMyAdmin This tutorial...

Copying a database table with phpMyAdmin

phpMyAdmin series 12. Copying a database table with phpMyAdmin This tutorial assumes you've...