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 Test ( id int, birthday date, hired_at date ); INSERT INTO Test Values (1, NULL), (2, NULL), (3, NULL); UPDATE Test SET birthday = ( '1960-01-01'::date + round(random()*(now()::date - '1960-01-01'::date))::int ); UPDATE Test SET hired_at = ( birthday + (18 * 365) + round(random()*(now()::date - birthday - (18 * 365)))::int ); SELECT * FROM Test

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

Copy Clear