Sql Programming Tutorials, Guides & Best Practices
Explore 14+ expertly crafted sql tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.
Adblocker Detected
It looks like you're using an adblocker. Our website relies on ads to keep running. Please consider disabling your adblocker to support us and access the content.
How to Disable MySQL Password Validation on Ubuntu 25.04
sudo mysqlRun the following command in the MySQL prompt:
How to Move the MySQL Data Directory to a New Location on Ubuntu 25.04
/mnt/data/mysql/ r,
/mnt/data/mysql/** rwk,Then reload AppArmor:
How to Install PHP, MySQL, and phpMyAdmin on Ubuntu 25.04 (LAMP Stack Setup Guide)
Add this line to your ~/.bashrc or ~/.zshrc file:
export PATH="$HOME/.config/composer/vendor/bin:$PATH"MySQL Cheatsheet: Comprehensive Guide with Examples
Introduction
MySQL is a popular open-source relational database management system used by developers and businesses worldwide. It supports a wide range of operations that allow you to create, manage, and manipulate data efficiently. This comprehensive cheatsheet covers essential MySQL commands and concepts, complete with examples presented in HTML tables for easy reference.
Selecting the Sum of a JSON Property in MySQL
Suppose you want to calculate the total quantity of products ordered by all customers. The quantity is stored within the JSON field order_details. You can extract this value and sum it across all rows using the following query:
SELECT SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(order_details, '$.quantity')) AS UNSIGNED)) AS total_quantity
FROM orders;