
Structured Query Language (SQL) is a standardized query language for requesting information from a database. In this tutorial, you’ll learn how to run SQL queries on a database using phpMyAdmin. A query helps you create, read, update and delete (RUN CRUD OPERATIONS) from a table or tables.
Read more about SQL here.
It is very easy to run SQL queries on a database in phpMyAdmin.
In this tutorial, I assume that you have created a database.
- First, log into your cPanel.
- Click on phpMyAdmin in the DATABASES section. This will open phpMyAdmin in a new tab.
- From the tabs at the top, click on SLQ. You can perform simple to complex CRUD operations by typing your queries in the text area provided.

Run SQL query to insert Data.
To insert data using a query in phpMyAdmin, you’ll need to write and execute an INSERT QUERY. Normally an INSERT QUERY will have the syntax below:
INSERT INTO DATABASE_NAME.TABLE_NAME (FIELD1, FIELD2) VALUES (‘VALUE 1’, ‘VALUE 2’);
Run SQL query to select Data
A simple SELECT QUERY statment would have the syntax below.
SELECT column1, column2, FROM DATABASE_NAME.TABLE_NAME WHERE column1 = ‘value_x’;
Run SQL query to update data
A basic update query will have the following syntax:
UPDATE DATABASE_NAME.TABLE_NAME SET column1 = ‘value1’, column2 = ‘value2’ WHERE column1 = ‘value_x’;
Run SQL query to delete data
A simple DELETE QUERY will look like this:
DELETE FROM DATABASE_NAME.TABLE_NAME WHERE column1 = ‘value1’;
Once you have written your query, click on GO button to execute.
That is how you can write and execut5e SQL QUERIES on a database in phpMyAdmin.