0

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?

2
  • 1
    I don't think this is a part of core postgresql, perhaps you need to install the corresponding extension first. Commented Oct 23, 2013 at 19:06
  • 1
    this post has the solution: stackoverflow.com/questions/12505158/… Commented Oct 23, 2013 at 19:40

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.