Essential SQL Functions for Data Manipulation
Essential SQL Functions for Data Manipulation
Date and Time Functions
DATE_FORMAT
The DATE_FORMAT function allows you to display date/time values in different formats.
-- Function: DATE_FORMAT
SELECT DATE_FORMAT(CURRENT_TIMESTAMP(), "%Y-%m-%d %H:%i:%s") AS formatted_time,
DATE_FORMAT(creation_date, "%m - %w") AS formatted_date
FROM em ...
Posted on Sat, 10 Oct 2026 16:16:48 +0000 by drisate
Conditional Logic Functions in MySQL
MySQL provides several functions for implementing conditional logic in queries, including CASE, IF, IFNULL, and ELT functions.
Sample table structure:
+----+-----------+-----+-------+--------+
| id | name | sex | level | weight |
+----+-----------+-----+-------+--------+
| 1 | xiaohong | 1 | 1 | 50 |
| 2 | xiaoming | 0 | 0 ...
Posted on Sat, 09 May 2026 11:28:04 +0000 by shamuraq