Real-time Setup: Fully automated domain and web hosting services.

Now Hosting Over 50,000 Domain Names!        

Accredited in Kenya, Rwanda, Nigeria & South Africa.

Kenya's Largest Domain Registar - 2021 KeNIC Report


0722 209 414 | 0733 367 596
info@kenyawebexperts.co.ke

 
 
 

Knowledgebase

Portal Home > Knowledgebase > Databases > Running SQL queries on a database with PHPMyAdmin Kenya

Running SQL queries on a database with PHPMyAdmin Kenya Print

  • 0

This tutorial is to teach you how to run SQL queries on a database with PHPMyAdmin. We will assume that you are currently logged into PHPMyAdmin, and for the purpose of this tutorial, we will use a database with two tables as our example. The PHPMyAdmin main screen is broken into two sections. The left hand side is blue, and this is where you will find your database listed. Below the database, you will see the names of the tables that are in the database. The right hand side is a large white window, and this is where the activity takes place.

To run SQL queries on a database, the first thing you need to do is click the on the name of the database table that you want to run a SQL query on. This opens the table details in the right hand window. As you learned in another tutorial, "Deleting fields from database tables with PHPMyAdmin", you can delete a field from a table by checking the box in the field row, and clicking on the Delete icon (the big red X below the table). In this tutorial, you are going to learn how to delete a field using pure SQL commands.

Go to the right hand side and click on the database name. This will bring up the details for the database in the right hand window. Click the SQL button at the top of the window. This opens a box, titled "Run SQL query/queries on database. You will then need to type the SQL command to delete the field from the table into the box. It would look something like this: ALTER TABLE 'this is where the name of the table goes' DROP 'this is where the name of the field goes' . Then when you are done, you click on Go. A pop-up will ask if really want to perform the action. Click OK. The command screen will then confirm that your SQL query has been successful. You have just deleted a field from a table.

For more information about SQL syntax, visit the MySQL documentation available here. Just click on the icon under the PHPMyAdmin name, that has the red SQL on it. This is the end of this tutorial. You now know how to run a SQL query on a database using PHPMyAdmin.


Was this answer helpful?

« Back

Our official partners

The Best Web Hosting Company in Nairobi, Kenya.

Kenya Website Experts Ltd is the Largest Web Hosting Company in Kenya, our core focus is helping and empowering businesses & organizations online. Thousands of customers rely on our domains and web hosting to get their ideas online. We offer everything you need to create an effective & successful online presence backed by expert, personalized customer support. We offer ultra fast, reliable, affordable and secure website hosting services, email hosting, cloud hosting and SSL certificates. We make registration of Kenyan domain names (.co.ke, .or.ke .ac.ke) and international domains (.com, .org, .net) fast, simple, and secure. Our expert team is always on hand to help answer your questions, get you started, and grow your presence online. We deliver on performance, security, reliability and customer service day in, day out, and we’re a trusted partner.

 

Get everything you need for Online Prosperity.