Blog

python tutorials and learn python

Created with Sketch.

MySQL GREATEST and LEAST

MySQL GREATEST and LEAST Summary: in this tutorial, you will learn how to use MySQL GREATEST and LEAST functions to find the greatest and smallest values of two or more fields respectively. Introduction to MySQL GREATEST and LEAST functions Both GREATEST and LEAST functions take N arguments and return the greatest and smallest values respectively. The…
Read more

MySQL COALESCE Function

MySQL COALESCE Function Summary: this tutorial introduces you to the MySQL COALESCE function that allows you to substitute NULL values. Introduction to MySQL COALESCE function The following illustrates the COALESCE function syntax: COALESCE(value1,value2,…); Code language: SQL (Structured Query Language) (sql) The COALESCE function takes a number of arguments and returns the first non-NULL argument. In…
Read more

MySQL Comparison Functions

MySQL Comparison Functions COALESCE – return the first non-NULL arguments, which is very handy for substitution ofNULL. GREATEST & LEAST – take n arguments and return the greatest and least values of the narguments respectively. ISNULL – return 1 if the argument is NULL, otherwise, return zero.

MySQL Aggregate Functions

MySQL Aggregate Functions Summary: in this tutorial, you will learn about MySQL aggregate functions including AVG COUNT, SUM, MAX and MIN. Introduction to MySQL aggregate functions An aggregate function performs a calculation on multiple values and returns a single value. For example, you can use the AVG() aggregate function that takes multiple numbers and returns…
Read more

MySQL Comment In Depth

MySQL Comment In Depth Summary: in this tutorial, you will learn how to use MySQL comments to document an SQL statement or a block of code in MySQL. Comments Comments can be used to document the purpose of an SQL statement or the logic of a code block in a stored procedure. When parsing SQL…
Read more

How To Map NULL Values To Other Meaningful Values

How To Map NULL Values To Other Meaningful Values Summary: in this tutorial, you will learn how to map NULL values to other meaningful values. Dr.E.F.Codd, who is the creator of the relational model for the database, introduced the NULL concept in the relational database theory. According to Dr.E.F.Codd, NULL means unknown value or missing…
Read more

How to Get MySQL Today’s Date

How to Get MySQL Today’s Date Summary: in this tutorial, you will learn how to query data that matches with the MySQL today‘s date by using built-in date functions. Getting MySQL today’s date using built-in date functions Sometimes, you may want to query data from a table to get rows with date column is today, for…
Read more

MySQL NULL: The Beginner’s Guide

MySQL NULL: The Beginner’s Guide Summary: in this tutorial, you will learn how to work with MySQL NULL values. In addition, you’ll learn some useful functions to deal with the NULL values effectively. Introduction to MySQL NULL values In MySQL, a NULL value means unknown. A NULL value is different from zero (0) or an…
Read more

MySQL Interval

MySQL Interval Summary: in this tutorial, you will learn how to use MySQL interval values to perform date and time arithmetic. Introduction to MySQL interval values MySQL interval values are used mainly for date and time calculations. To create an interval value, you use the following expression: INTERVAL expr unit Code language: SQL (Structured Query…
Read more

MariaDB vs. MySQL

MariaDB vs. MySQL   The following table illustrates the main differences between MariaDB and MySQL: MySQL MariaDB Developer Oracle Corporation MariaDB Corporation AB (MariaDB Enterprise), MariaDB Foundation (community MariaDB Server) Protocols MySQL MySQL + MariaDB Source code Open Source + Proprietary Open Source Development Closed Open Collaboration Limited Extensive Storage Engines InnoDB MyISAM BLACKHOLE CSV…
Read more