This is just a quick tip, I did some searches and couldn’t find a solution to insert random Boolean values into postgres table.
In fact, it’s quite simple:
INSERT INTO table( id, boolean_value) VALUES (1, cast(cast(random() as integer) as boolean));
Leave a Reply