## MySQL ABS() and SIGN() [With Easy Examples]

In this tutorial, we will learn about the MySQL ABS() and the MySQL SIGN() functions. The ABS() function is used to find the absolute value of a number. The absolute value of a number is the non-negative value of the number. MySQL ABS() disregards the sign of a number and returns the result as a …

## MySQL PI() – Calculating Pi Value in MySQL [Simple Examples]

In this tutorial, we will study the MySQL PI() function. While studying maths in high school, you must have come across the value of š known as Pi. The value of Pi is 22/7 or 3.142 up to three decimal places. Pi is used in a variety of mathematical calculations –Ā  geometry, calculus, and physics. …

## MySQL DIV and MOD – Easy examples to find the quotient and remainder in MySQL

In this tutorial, we will study the MySQL DIV and MOD functions. As we saw in an earlier article, MySQL provides us with a variety of arithmetic functions. We will explore the DIV and MOD functions in this one. The MySQL DIV function performs the integer division of two numbers and returns the quotient. An …

## MySQL SQRT() – Easy Way to Find the Square Root with MySQL

In this tutorial, we will learn about the MySQL SQRT() function. In high school maths, you must have come across exercises involving finding the square root of a number. Furthermore, square root finds applications across geometry, calculus, statistics, physics and many other domains which makes it one of the essential mathematical operations. For this reason …

## MySQL FIELD() and ELT()

In this tutorial, we will learn about the MySQL FIELD and ELT functions. The FIELD() function is used to return the position of value from a list of values. FIELD() is a case-insensitive function.Ā  The ELT() function does the exact opposite of the FIELD() function. It is used to return the value at a given …

## MySQL POW() and POWER() – Easily find the exponent in MySQL

In this tutorial, we will learn about the MySQL POW() and POWER() functions. Suppose you have to do certain calculations on the data in your table which involves finding the squares, cubes or other powers raised to the number. For such operations, MySQL provides us with the POW() and POWER() functions. The POW() and POWER() …

## MySQL SUBSTRING_INDEX() – Working with Substrings in MySQL

In this tutorial, we will learn about the MySQL SUBSTRING_INDEX() function. SUBSTRING_INDEX() is a string function that is used to return the substring of a string before a specific number of occurrences of a given delimiter. For instance, you have the following string value – ā192.168.1.10ā. Now if you specify the delimiter as ā.ā and …

## MySQL SUBSTRING() and SUBSTR() Functions – How to extract substrings in MySQL?

In this tutorial, we will learn about the MySQL SUBSTRING() and SUBSTR() functions. Both functions do the same thing but have different names. SUBSTRING() and SUBSTR() are used to extract a substring from a given string from a given position. You may also specify the number of characters you wish to extract into the substring. …

## MySQL INSERT() Function – How to Insert Values Within A String In MySQL?

In this tutorial, we will learn about the MySQL INSERT() function. Suppose you have a string ‘Java is my favorite programming languageā. However, Java isnāt my only favorite programming language. I love MySQL too and so I want to change the string to āJava and MySQL are my favourite programming languageā. This is where the …

## MySQL LOCATE() – Find Substrings in a String with MySQL

In this tutorial, we will study the MySQL LOCATE() function. The LOCATE() function is a string function which is used to find out the position of the first occurrence of a substring within a string. If the string does not contain the substring, then the position is returned as 0. The LOCATE() function performs a …