Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE TABLE passports ( id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, user_id INTEGER NULL, series INTEGER NULL, number INTEGER NULL ); INSERT INTO passports (id, user_id, series, number) VALUES (1, 1, 2301, 148145), (2, 5, 801, 4091), (3, 145, 3206, 14694), (4, 147, 2317, 914), (5, 276, 3515, 408145), (6, 18, 21, 881511), (7, 7, 4515, 9184), (8, 1873, 7624, 191744), (9, 887, 21, 81400); SELECT user_id, CONCAT_WS(" ", LPAD(series, 4, '0'), LPAD(number, 6, '0')) as passport FROM passports;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear