SQL DELETE command

DELETE command is used to delete row from table. The structure is the following: DELETE FROM <tableName> WHERE <condition>; Warning: if we don't put condition, then it will simply delete all rows in the table. For example, say we have: MariaDB [firstDB]> SELECT * FROM employee; +------------+-----------+-----------------+--------+ | first_name | last_name | employee_number | salary … Continue reading SQL DELETE command

SQL UPDATE command

SQL UPDATE command is used to update existing rows in the database. The command structure is the following: UPDATE <tableName> SET <columnName>=<newValue> WHERE <condition>; If we don't put WHERE condition, then it will update all rows, so we should be very carefully to put the WHERE condition. For example if we have the following table: … Continue reading SQL UPDATE command

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 … Continue reading MariaDB creating Tables

Installing MariaDB on Ubuntu

Mariadb is an excellent relational database management system that started as a fork  for mySQL. The reason for the fork was concern over the way that Oracle is taking mysql. Installing MariaDBin on Ubuntu 16.04 is very easy. Since it is part of the ubuntu repository, then apt-get install mariadb-server will install mariaDB. bob@vmUbuntu:~$ sudo apt-get install … Continue reading Installing MariaDB on Ubuntu