Skip to content
Related Articles

Related Articles

Improve Article

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. 

  • Start xampp server.

  • 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 

Command – 

INSERT INTO student 
VALUES(1,'sravan kumar','m',95)

Output :

Insert multiple records at a time :

INSERT INTO student 

Output :

SELECT command is used to display data in the table.

SELECT * FROM student

Output :

Display name and marks :

SELECT name,marks 
FROM student

Output :

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 :

My Personal Notes arrow_drop_up
Recommended Articles
Page :