[My SQL] With Recursive CTE(Common Table Expression)???

When you have one table for all of codes in your system, it is often to have unique_code and parent code in that table. It enables to track down hierarchical structure of codes to see who is parent or child of that record. MySQL Recursive CTE make is simple and clear to query those relationships […]

[MySQL] Backup, Restore, Import, and Export

When needed, snapshot backups of MySQL instance are not that useful. So, I tend to backup my DB with mysqldump. The script below dump all of schemas including system tables, users and privileges. It also drops table if exists and add them with its data. This script saved my days so often. One DB/Schema can […]