Practical solutions

MySQL Howtos How-To Guides

Solve the problem. Keep building. Collection of MySQL how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Use PHP MySQLi Function to Fetch Last Inserted IDThis tutorial demonstrates how to fetch the last insert id from the MySQL database using PHP MySQLi function. How to Find Tables in MySQL With Specific Column Names in ThemThis tutorial demonstrates how to find tables from a schema with specific column names in MySQL. How to Convert Rows to Columns in MySQLThis tutorial demonstrates how to convert or change rows to columns in MySQL. How to Convert Blob Data Into the Text Format in MySQLThis article is a detailed guide about the blob datatypes in MySQL and its conversion into the non-binary format. How to Rebuild Index in MySQLThis tutorial demonstrates how to rebuild indexes in MySQL. How to Drop a Column if It Exists in MySQLIn today's post, we'll learn how to drop a column if it exists in MySQL. How to Add an Auto Increment Column in MySQLIn today's post, we'll learn how to add an auto-increment column in MySQL. How to Specify Unique Constraints for Multiple Columns in MySQLIn today's post, we'll look at many methods for specifying unique constraints for multiple columns in MySQL. How to Check if a Database Exists in MySQLIn today's post, we'll learn how to check if a database exists in MySQL. How to Print to Console in MySQLIn this article, we discuss how to print messages to the console in MySQL and how SELECT statement can be used to perform it. Mainly we discuss some uses cases to understand the concept easily. How to Split String Into Rows in MySQLIn this article, we discuss what splitting string into rows is and how to create a self-executing function. Mainly we discuss the SUBSTRING_INDEX() method along with some examples to understand the concept easily. How to Show Locks in MySQLIn today's post, we'll learn about how to show locks in MySQL. How to Get Last 30 Days Data in MySQLThis article discusses how to get the last 30 days' data records using the SELECT method. We have used now(), data_sub(), curdate(), and between() commands. How to Connect to a MySQL Database Using JDBCThis article discusses the JDBC and the requirements to connect a database with JDBC. We also looked at an example to see how we can implement a Java code to connect the MySQL database. How to Create Cron Job in MySQLThe main aim of this article is to demonstrate how to schedule a query written in MySQL and execute it after a fixed amount of time using Cron Jobs. How to Clear the Screen in MySQLThe main aim of this topic is to demonstrate how to clear the screen of the MySQL console. We also have a look at how to clear console in the different operating systems. How to Update Record if It Exists Else Insert It in the MySQL TableIn today's post, we'll learn how to update records in a MySQL table if exists, else insert them. MySQL COUNT IF MethodThis tutorial demonstrates how to use the COUNT IF method in a MySQL database. Minus Operation in MySQLThis tutorial guides you about how can you emulate the MINUS operation in MySQL. It also teaches you various ways to simulate MINUS Operation with different examples. Different Ways to Connect a Remote MySQL Server Using UbuntuThis tutorial educates about different ways to connect a remote MySQL server using Ubuntu to start/stop service as well as to read/write data. MySQL SUBSTRING_INDEXIn this guide, we will understand the concept of substring_index function in MySQL. Usage of IF EXISTS in MySQL DatabaseThis tutorial demonstrates how to use IF EXISTS in a MySQL database. Usage of UPDATE JOIN in MySQLThis tutorial demonstrates how to use update join in a MySQL database. CASE WHEN in MySQLThis tutorial is about using the CASE WHEN statement in a MySQL database.