Data Manipulation
To add records, click on data -> plus icon then double click on title filed and add value and same add date also. Add more records. The SQL statements below are also visible on the console.
Using SQL command:
INSERT INTO books(title, year) VALUES (' A History of Earth', ' 2018-03-02');
Let’s see CRUD operations in MariaDB using SQL commands for manipulating data.
Query – 1: Insert Data
INSERT INTO books (title, year) VALUES ('Computer Networks', ' 2011-03-02');
Output:
Now you can see on data tab that this record get inserted in the books table.
Query – 2: See All Records
SELECT * FROM books;
Output:
Query – 3: Update Record
UPDATE books SET title = 'OS' WHERE YEAR = '2018-03-02';
Output:
Query – 4: Delete Record
DELETE FROM books WHERE title = 'physics';
Output:
Query – 5: Sort Record
select title, year from books order by title;
Output:
Query – 6: Retrieve data between specific year
SELECT * FROM books WHERE year BETWEEN '2018-03-02' AND '2022-11-02';
Output:
How to Create & Manipulate Data in MariaDB?
Data Creation and manipulation are essential for businesses and organizations in today’s data-driven environment. The well-liked open-source relational database management system MariaDB provides a strong foundation for managing data. It’s critical to grasp how to create and modify data in MariaDB. In this article, we will go through the creation and manipulation of data in MariaDB.