DataBase Operations through XAMPP Console
Last Updated :
22 Mar, 2021
In this article, we are going to perform database operations in My SQL Xampp Server using Xampp tool. We will perform the following operation as follows.
- Creating database
- Create a table in database
- Insert data into it
- View data.
Requirements -Xampp server
Introduction :
Database is a collection of related operation. MySQL is a one of the query language for managing the databases. MySQL is a database system used on the web which runs on a server. It is mainly used for large applications.
Xampp :
It has an Apache HTTP Server, MariaDB, and interpreter for 11 different programming languages like Perl and PHP.
X - Cross-platform
A - Apache
M - MySQL
P - PHP
P - Perl
To start your XAMPP server, you can follow the given below steps as follows.

- Type “localhost/phpmyadmin” in your browser. You can see the following screenshots as follows.

Steps to implement database operations :
- Create a database named mydata.

- Create a table named student with 4 columns (student_id,name,gender,marks).

- Open console tab and start typing commands.
Note -
To execute a command press ctrl+Enter Button.
Database Operations :
Insert :
Insert command is used to insert data into the table.
Syntax -
insert into table_name
values(value1,value2,value3,.....,valuen);
Command -
INSERT INTO student
VALUES(1,'sravan kumar','m',95)
Output :

Insert multiple records at a time :
INSERT INTO student
VALUES(2,'bobby','m',85),(3,'ojaswi','f',95)
Output :

SELECT :
SELECT command is used to display data in the table.
SELECT * FROM student
Output :

Display name and marks :
SELECT name,marks
FROM student
Output :

UPDATE :
It is used to update / change value based on the given condition.
Syntax -
update table_name
set column_name="value" where clause..
Command -
UPDATE student
SET name="rohith"
WHERE marks=95
Output :
Similar Reads
AJAX Database Operations In this article, we will discuss how to access the information available in the database using the AJAX. We will use the MySQL database, access the information stored in the database, and display the information on the webpage using the AJAX.To perform this task we will create some sample entries in
3 min read
PHP | Inserting into MySQL database Inserting data into a MySQL database using PHP is a crucial operation for many web applications. This process allows developers to dynamically manage and store data, whether it be user inputs, content management, or other data-driven tasks. In this article, We will learn about How to Inserting into
6 min read
PHP | MySQL Database Introduction What is MySQL? MySQL is an open-source relational database management system (RDBMS). It is the most popular database system used with PHP. MySQL is developed, distributed, and supported by Oracle Corporation. The data in a MySQL database are stored in tables which consists of columns and rows.MySQL
4 min read
How to set up a PHP Console ? PHP is a backend server-side language of web development. In general, we don't need to take input from the console but sometimes we need to run a small function or block of code, for which we need to take input from the console. Requirements: Server: xampp or WampServer How to set up PHP Console ? S
1 min read
Laravel | MySQL Database Connection The database is an important element in any application. Laravel by default provides the support of MySQL. MySQL is a well known, open-source RDBMS (Relational Database Management System). Process for Connecting to the Database: Step 1: First we have to create a database. So, we will start Apache an
3 min read