Home » MariaDB Insert

MariaDB Insert Data

In MariaDB, INSERT INTO statement is used to insert data in a selected table.

Syntax:

Or

Or

You can use it also with WHERE condition.

Note: While inserting records in MariaDB table, you must provide a value for every NOT NULL column. You can only omit a column if the column allows NULL values.

Example:

Let’s insert some data in “Students” table.

Mariadb Insert data 1

Now the records are inserted in the table. You can check it by using SELECT statement.

Output:

Mariadb Insert data 2


Insert Multiple Records in Table

You can also insert multiple values in MariaDB table at one time.

Example:

Mariadb Insert data 3

Now check the inserted records by using SELECT statement.

Output:

Mariadb Insert data 4

Next TopicMariaDB Select

You may also like