MySQL Dump Database Using mysqldump

How to Dump Databases in MySQL Using mysqldump In this tutorial, you’ll learn how to dump a database in MySQL using mysqldump. There are many backup tools available on the market. However, if you need to back up a database using the built-in tool, then this tutorial is for you. MySQL mysqldump is one of the most useful … Read more

MySQL RIGHT() Function with Examples

How to Use the MySQL RIGHT() Function In this tutorial, you’ll learn how to use the MySQL RIGHT() function. RIGHT() returns a specified number of characters from the right of a given string. MySQL RIGHT() Syntax The syntax of the RIGHT() function is as follow: RIGHT(string, length) Remarks The function returns NULL if either string … Read more

MySQL LEFT() Function with Examples

How to Use the MySQL LEFT() Function In this tutorial, you’ll learn how to use the MySQL LEFT() function. LEFT() returns a specified number of characters from the left of a given string. MySQL LEFT() Syntax The following is the syntax of the LEFT() function: LEFT(string, length) Remarks This function returns NULL if either string … Read more

MySQL RANK() Function with Examples

How to Use the MySQL RANK() Function In this tutorial, we’ll learn how to use the MySQL RANK() function. The RANK function returns the rank of the current record within the partition of a result of set. MySQL RANK() Syntax The syntax of the RANK() function is as follows: RANK() OVER( PARTITION BY expression [, … Read more

MySQL SELECT Statement with Examples

MySQL-SELECT-Statement-with-Examples

How to Use the MySQL SELECT Statement In this tutorial, you will learn to select rows from a table using the MySQL SELECT statement. SELECT is the most basic of SQL. However, it is also a query that can increase the execution speed depending on a combination of conditions. To select rows from multiple tables, … Read more

MySQL DISTINCT Clause with Examples

How to Use the MySQL DISTINCT Clause In this tutorial, we’ll learn how to use the MySQL DISTINCT. DISTINCT is used with the SELECT statement to select only different (distinct) values a table in a database. We can use the DISTINCT clause with the COUNT() function to count only the number of the distinct values. … Read more

MySQL TRIM() Function with Examples

How to Use the MySQL TRIM() Function In this tutorial, we’ll learn how to use the MySQL TRIM() function. TRIM() is a function to remove all prefixes and suffixes, including leading and trailing spaces, from a given string. MySQL TRIM() Syntax The syntax of the TRIM() function is as follows: TRIM([BOTH | LEADING | TRAILING] … Read more

MySQL HAVING Clause with Examples

How to Use the MySQL HAVING Clause In this tutorial, you will learn how to use the MySQL HAVING clause, which is used to filter groups based on specified conditions. It is common to use the HAVING clause together with the GROUP BY clause. MySQL HAVING Syntax The syntax of the HAVING clause can be … Read more

MySQL ROUND() Function with Examples

How to Use the MySQL ROUND() Function In this tutorial, we’ll learn how to use the MySQL ROUND() function. ROUND() is a function to round a number to a specified number of decimal paces. MySQL ROUND() Syntax The syntax of the ROUND() function is as follows: ROUND(number, digits) or ROUND(number) Remarks The number argument is … Read more

Python File readline() Method with Examples

How to Use the File readline() Method in Python In this tutorial, you’ll learn how to use the file readline() method in Python. The file readline() method reads and returns a single line from the file. Python File readline() Syntax The syntax of the file readline() method is as follows: file.readline() Remarks The readline() method reads a single line … Read more

Python sort() and sorted() with Examples

How to Use sort() and sorted() in Python In this tutorial, you’ll learn how to use the sort() list method and sorted() function in Python. Python lists have a built-in sort() method that can be used to sort a list in ascending, descending, or user-defined order.  Unlike sort(), sorted() is a built-in function that builds a new sorted list from … Read more

Python split() String Method with Examples

How to Use the Python split() String Method In this tutorial, you’ll learn how to use the Python split() string method. The split() splits a string and returns a list of strings. Python split() String Method Syntax The syntax of the Python split() method is as follows: split(separator [, maxsplit]) The split() Method Parameters separator: Optional. A string … Read more

Python replace() String Method with Examples

How to use the Python replace() String Method In this tutorial, you’ll learn how to use the replace() string method in Python. The replace() method returns a copy of the string with all occurrences of old substring replaced by a new substring. Python replace() Syntax The following illustrates the syntax of the replace() string method: string.replace(old_substring, new_substring [, count]) Method … Read more

MySQL NOW() Function with Examples

How to Use the MySQL NOW() Function In this tutorial, we’ll learn how to use the MySQL NOW() function. NOW() is a function to return the current date and time. MySQL NOW() Syntax The syntax of the NOW() function is as follows: NOW() Remarks The date and time is returned as “YYYY-MM-DD HH-MM-SS” Examples Example … Read more

MySQL CURRENT_DATE Function with Examples

How to Use the MySQL CURRENT_DATE Function In this tutorial, we’ll learn how to use the MySQL CURRENT_DATE function. The CURRENT_DATE function is used to return the current date. MySQL CURRENT_DATE Syntax The syntax of the CURRENT_DATE function is as follows: CURRENT_DATE() Remark This function is equal to the CURDATE() function. The date is returned … Read more

Python round() Function with Examples

How to Use the Python round() Function In this tutorial, you’ll learn how to use the Python round() function. The round() function returns a number rounded to a specified number of digits. Python round() Syntax The syntax of round() is as follows: round(number[, digits]) Parameters Number: Required. The number that you want to round. Digits: Optional. If … Read more

MySQL IF Statement with Examples

How to Use the MySQL IF Statement In this tutorial, you’ll learn how to use the MySQL IF statement. In MySQL, IF is a flow control statement and allows you to execute a block of SQL statements when a condition is TRUE, and execute a different block of SQL statements when the condition evaluates to FALSE. MySQL IF Syntax The … Read more