MySQL

How to Add Leading Zeros to a Number

SELECT LPAD(23, 5, 0);

+----------------+
| LPAD(23, 5, 0) |
+----------------+
| 00023          |
+----------------+

Import CSV file into database table

mysqlimport --ignore-lines=1 --fields-terminated-by={{ DELIMITER like \| }} --local --host {{ DB HOSTNAME }} -p {{ DATABASE }} {{ FILENAME -> must be identical to DB table name }}

MySQL Disable Foreign Key Checks

SET foreign_key_checks = 0;

Last updated

Was this helpful?