CURDATE() FUNCTION in MySQL

CURDATE() FUNCTION The MySQL CURDATE function is used to get the current date. The various versions of MySQL support the CURDATE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURDATE( ) Example 1: mysql> SELECT CURDATE (); Output: ‘2019-07-05’ Explanation: The current date … Read more

ADDTIME() FUNCTION in MySQL

ADDTIME() FUNCTION The MySQL ADDTIME function gets a time value after adding a certain time interval. The various versions of MySQL support the ADDTIME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0 and MySQL 4.1.1. Syntax: ADDTIME( start_value, time ) Parameters: start_value: It is used to specify the time to which … Read more

ADDDATE() FUNCTION in MySQL

ADDDATE() FUNCTION The MySQL ADDDATE function gets a date value after adding a certain time/date interval. The various versions of MySQL support the ADDDATE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, and MySQL 3.23. Syntax: ADDDATE( date, INTERVAL value unit ) OR ADDDATE( date, days ) … Read more

PostgreSQL vs MySQL

Below is a comparative study of PostgreSQL and MySQL. PostgreSQL MySQL More densely featured database system. Known for its fast speed and ease of use. Unified database server having a single storage engine. Multi-layer structure having a set of storage engines. Provides reliability, data integrity, and developers-friendly features. Generally used with PHP to deal with … Read more

MariaDB vs MySQL

Below is a comparative study of MariaDB and MySQL. MariaDB MySQL Purely open-source and vibrant development environment. Uses a dual licensing model. Less popular comparatively. More popular. Less reliable and less trusted database comparatively. More reliable and trusted database. Developed by a small company. Developed by the Oracle corporation. Released under GPL, LGPL, or BSD. … Read more

MIN function in MySQL

MySQL MIN In MySQL, the MIN function is used to get the minimum value of an expression. Syntax: SELECT MIN (aggregate_expression) FROM table_name WHERE conditions; Parameters: Aggregate_expression: It is used to specify the column or expression to be utilized by the MIN function. Example: Items table: ID NAME QUANTITY 1 Electronics 30 2 Sports 45 … Read more