I'm trying to run this query in postgresql:
CREATE TABLE MMCompany
(
CompanyID uuid PRIMARY KEY NOT NULL DEFAULT uuid_generate_v1(),
Name VARCHAR (150) NOT NULL,
PhoneNumber VARCHAR(20) NOT NULL,
Email VARCHAR(100),
CompanyLogo BYTEA
);
i've read that uuid_generate_v1()
replaces newid()
of sql server but it doesn't work and i get the following error:
ERROR: function uuid_generate_v1() does not exist HINT: No function matches the given name and argument types. You might need to add explicit type casts.
what is the right syntax?