Tagged articles

LPAD

1 articles · Page 1 of 1
Code Farmer Manor Chronicle
Code Farmer Manor Chronicle
Sep 20, 2026 · Databases

One SQL to Generate 2000 Test Rows: Stop Hand-Writing VALUES

Learn how to generate 2000 test rows in PostgreSQL using a single INSERT...SELECT with generate_series, deriving column values via series numbers, zero-padding with LPAD, explicit timestamps, and ON CONFLICT for idempotent execution, plus random data variations and MySQL equivalents.

INSERT SELECTKingBaseESLPAD
0 likes · 8 min read
One SQL to Generate 2000 Test Rows: Stop Hand-Writing VALUES