Search posts

MariaDB creating Tables

First you need to make sure you are using the correct database (if don’t know how, it was explained in previous post).
So in order to create table we need to use CREATE TABLE command.

The simple structure is following:CREATE TABLE <tableName> (<columnName1> <type1>, <columnName2> <type2>,...);
The list of data types for MariaDb is long, but for our example we will use the INT data type (which is Integer from -2147483648 to 2147483647 signed), and TEXT (which is a text that has a maximum length of 65,535 characters).

We will create the table employee, and it will have 4 columns, the first name of the employee, his last name, his employee number and last his salary.