Skip to content

SQL PostgreSQL Create Table with GUID Primary Key

Jason Lewis edited this page Sep 29, 2023 · 1 revision

Up

CREATE TABLE <table name> (
    <primary key name> uuid PRIMARY KEY DEFAULT gen_random_uuid()
    ...
);
Clone this wiki locally