Sling Academy
Home/MySQL/Page 3

MySQL

MySQL is a popular open-source relational database management system known for its speed, reliability, and ease of use, widely used for web applications and online data storage.

FROM_UNIXTIME() in MySQL 8: Convert a UNIX timestamp to a date

Updated: Jan 27, 2024
Understanding UNIX Timestamps A UNIX timestamp consists of the number of seconds that have elapsed since January 1, 1970, at 00:00:00 Coordinated Universal Time (UTC), not including leap seconds. It’s a simple way to track time,......

MySQL 8: Set a fallback value for NULL columns in SELECT statement

Updated: Jan 27, 2024
Overview In database management, specifically when working with SQL databases like MySQL, dealing with NULL values is a common challenge. NULL represents a missing or inapplicable value in a column. However, it is often desirable to......

MySQL 8: How to concatenate multiple rows into a single string

Updated: Jan 27, 2024
Introduction In this tutorial, we will delve into the intricacies of concatenating multiple rows into a single string in MySQL 8. This is a common need in the realm of data presentation and reporting, where information from various......

MySQL 8: How to Limit Results in Each Group

Updated: Jan 27, 2024
Introduction Managing databases often involves complex queries, especially when it comes to aggregating and organizing data effectively. MySQL, a widely-used open-source relational database management system, provides several ways to......

Working with Self-Referencing and Self-Join in MySQL 8

Updated: Jan 27, 2024
Introduction In this tutorial, we’ll dive into the concepts of self-referencing and self-join in MySQL 8. These techniques are fundamental in handling recursive data structures where an entity refers to itself. Real-world......

MySQL 8: Get the latest row of each group with GROUP BY (3 approaches)

Updated: Jan 27, 2024
Introduction Retrieving the most recent record in each group is a common task when dealing with databases. With the rise of MySQL 8.0, developers now have more robust and efficient techniques at their disposal to accomplish this task.......

Transaction, commit, and rollback in MySQL 8: A Practical Guide

Updated: Jan 27, 2024
Introduction MySQL is a robust and popular database management system employed by developers for a wide range of applications. One of its fundamental features is the ability to manage transactions, which are groups of SQL statements......

Using ‘AFTER UPDATE’ trigger in MySQL 8: Tutorial & Examples

Updated: Jan 27, 2024
Introduction Triggers in MySQL are stored programs that automatically execute or fire when certain events occur. An AFTER UPDATE trigger happens immediately after a specified update operation is performed on a table. This tutorial will......

Using ‘BEFORE INSERT’ trigger in MySQL 8: A Practical Guide

Updated: Jan 27, 2024
Introduction In handling databases, one of the key aspects of maintaining data integrity is the use of triggers. MySQL, a powerful database management system, provides various types of triggers including ‘BEFORE INSERT’. In this guide,......

How to Set Expiration Date for a Record in MySQL 8

Updated: Jan 27, 2024
Introduction Managing data efficiently often requires setting expiration dates for records in databases, enabling automatic cleanup or archiving of outdated information. MySQL, a widely-used relational database system, provides......

Using GROUP_CONCAT() function in MySQL 8: A Practical Guide

Updated: Jan 27, 2024
The GROUP_CONCAT() function in MySQL is a powerful tool when working with aggregations. It enables the creation of a concatenated string result from a group of rows. Introduction to GROUP_CONCAT() The GROUP_CONCAT() function in......

Using RANK() and DENSE_RANK() in MySQL 8: A Practical Guide

Updated: Jan 27, 2024
Introduction When working with data in MySQL, ranking rows within a result set is a common task. This is especially true when dealing with analytics and leaderboards. MySQL 8 introduces two very powerful functions to make this task......