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 (and SQL) select command

select command is a SQL standard command, and is used to retrieve information from database tables. If you want to get all rows and columns from specific tables,then it is very simple: SELECT * FROM <tableName>; For example if we want to see all row in the employee table: MariaDB [firstDB]> SELECT * FROM employee; … Continue reading MariaDB (and SQL) select command