Running SQL Queries on a Database with phpMyAdmin

To run SQL queries on a database, first, log in to phpMyAdmin and then do the following:

1. Click the database on the left hand side that you wish to run the SQL query on.

2. Click the 'SQL' icon and enter your SQL query in the text box.

3. An example would be to delete a field from a table using SQL, enter the following query.

4. ALTER TABLE 'enter the name of your table containing the field here' DROP 'enter the field name here'

Note: Remember to include the ' in the query

5. Click 'Go' and 'OK' to execute the SQL command.

6. Click the database table on the left-hand side and you will see the field you nominated has been deleted.

7. You can also click the 'SQL' icon in the table view which will give you a partially completed SQL query.

Was this answer helpful? 0 Users Found This Useful (0 Votes)