Download MySQL : SQL Basic Operations (Insert, Select, Update, Delete) – Rull Full Version

welcome to wowaze site, you are on page MySQL : SQL Basic Operations (Insert, Select, Update, Delete) – Rull
Published on 2020-04-15 06:11:00 please download your needs here, and don’t forget to follow us by bookmarking this site.

You’re looking for #MySQL #SQL #Basic #Operations #Insert #Select #Update #Delete #Rull And are in the right place because we have prepared for you, please enjoy.


Database is a collection of connected data stored together on a medium that is organized according to a particular schema or structure, and with software to manipulate it for a particular purpose. Actually there are many basic operations in SQL but for now the basic operations in Databases that we will discuss are .Insert .Select .Updates .Delete and the rest we will discuss in another session

Insert is an operation or command in SQL whose function is to insert a new record or row into a table, here is the structure of the Insert query:

INSERT INTO TABLE_NAME (column1, column2, column3,…columnN) VALUES (value1, value2, value3,…valueN);

Column is the name of the attribute in the table that will be filled in while the value is the content of the attribute, for example, in the following query:
INSERT INTO student (name, name_name, gender, address) VALUES(‘1700018200’, ‘Bambang’, ‘male’, ‘Kali Mantan’);

Query OK, 1 row affected (0.12 sec)

If successful, a Query Ok message will appear, which means that the data has been successfully entered into the database.

After Insert Data we try to read the data that has been entered into the Database, it can be done in PhpMyAdmin or we can also use the Shell to read the data. In displaying this data or read, there are several queries or ways to be displayed. To display all data in the table (eg) students, the query used is:

Then a display will appear that displays the data of all students as below:

+———–+——————–+————— +——————————+
| nim | name_mhs | sex_sex | address |
+———–+——————–+————— +——————————+
| 1700018001 | Arief Hermawan | boy | Banda aceh, Aceh |
| 1700018002 | Marita Indriani | girl | Padang, West Sumatra |
| 1700018003 | Moh Maulana | boy | Medan, North Sumatra |
| 1700018004 | Siti Zunaizah | girl | Palembang, South Sumatra |
| 1700018005 | Atika Puspita Dewi | girl | Bandung, West Java |
| 1700018006 | Ita Rusmiani | girl | Surabaya, East Java |
| 1700018007 | Melinda Vindy Elys | girl | Bali, Denpasar |
| 1700018008 | Elsa Nurmalasari | girl | Mataram, West Nusa Tenggara |
| 1700018009 | Bima | girl | Longan |
| 1700018056 | Danis | boy | South Sumatra |
| 1700018100 | Bima | girl | Longan |
| 1700018200 | Bambang | boy | Former Times |
+———–+——————–+————— +——————————+
12 rows in set (0.00 sec)

What if we want to display the data as we wish or only special rows that we want to display? For example, I want to display student data whose NIM is 1700018056here’s the query:

SELECT * FROM student WHERE nim=’1700018056′;

Just add a WHERE condition followed by nim as a reference attribute, the data you want to display can come out, and it looks like this:

+————+————-+——+—– ————+
| nim | name_mhs | sex_sex | address |
+————+————-+——+—– ————+
| 1700018056 | Danis Faisal | boy | South Sumatra |
+————+————-+——+—– ————+
1 row in set (0.00 sec)

Or only a few attributes that you want to display, for example only nim, name and gender :

SELECT nim, student_name, gender FROM student;

And it will look like below:

+———–+——————–+————— +
| nim | name_mhs | sex_sex |
+———–+——————–+————— +
| 1700018001 | Arief Hermawan | boy |
| 1700018002 | Marita Indriani | girl |
| 1700018003 | Moh Maulana | boy |
| 1700018004 | Siti Zunaizah | girl |
| 1700018005 | Atika Puspita Dewi | girl |
| 1700018006 | Ita Rusmiani | girl |
| 1700018007 | Melinda Vindy Elys | girl |
| 1700018008 | Elsa Nurmalasari | girl |
| 1700018009 | Bima | girl |
| 1700018056 | Danis Faisal | boy |
| 1700018100 | Bima | girl |
| 1700018200 | Bambang | boy |
+———–+——————–+————— +

After Insert, Select, now go to Modify data or commonly called Update data. Update data can be done with PhpMyAdmin or can also be used with Shell. What needs to be considered is the reference attribute to change the data, so that the system is not confused when there is a query or command to update the data. In the case of this student, suppose we will change the data from name “Danis Faisal” Becomes “Danis” where the reference attribute is a NIM “1700018056”. Here’s the query

UPDATE student SET name_mhs=”Danis” WHERE nim=’1700018056′;

And below is how it looks after being updated, I only display 1 data, namely data “Danis” which has been previously updated

+————+———-+————–+——— ——–+
| nim | name_mhs | sex_sex | address |
+————+———-+————–+——— ——–+
| 1700018056 | Danis | boy | South Sumatra |
+————+———-+————–+——— ——–+
1 row in set (0.01 sec)

To delete data or DELETE is not much different from UPDATE, both must have attributes as references to delete data. In PhpMyAdmin itself to delete one of the data can press click on the Browse menu then click Ok, for the shell we have to type a command or Query, for example we want to delete data named “Danis” with nim “1700018056”here’s the query:

DELETE FROM student WHERE nim=’1700018056′;

And below is the display result after the data has been deleted

+———–+——————–+————— +——————————+
| nim | name_mhs | sex_sex | address |
+———–+——————–+————— +——————————+
| 1700018001 | Arief Hermawan | boy | Banda aceh, Aceh |
| 1700018002 | Marita Indriani | girl | Padang, West Sumatra |
| 1700018003 | Moh Maulana | boy | Medan, North Sumatra |
| 1700018004 | Siti Zunaizah | girl | Palembang, South Sumatra |
| 1700018005 | Atika Puspita Dewi | girl | Bandung, West Java |
| 1700018006 | Ita Rusmiani | girl | Surabaya, East Java |
| 1700018007 | Melinda Vindy Elys | girl | Bali, Denpasar |
| 1700018008 | Elsa Nurmalasari | girl | Mataram, West Nusa Tenggara |
| 1700018009 | Bima | girl | Longan |
| 1700018100 | Bima | girl | Longan |
| 1700018200 | Bambang | boy | Former Times |
+———–+——————–+————— +——————————+
11 rows in set (0.00 sec)

It’s like that for Insert, Select, Update, Delete, Happy learning, don’t forget to always try even though there are many obstacles *eak* Next there are still many queries that will be shared here, thanks for visiting, if anyone wants to ask please ask in the column comments we discuss together hehe. See You Papay





thank you for downloading MySQL : SQL Basic Operations (Insert, Select, Update, Delete) – Rull
, hopefully it can be useful for all of you. search for your other digital needs by using the search menu in the header of this site.