0

I just started learning PostgreSQL. I tried to create a table:

create table diagnosis(
    mkb10 char(5),
    opis varchar(100) not null,
    constraint pk_diagnosis primary key (mkb10)
);

But I get this error:

ERROR: syntax error at or near "char"

1 Answer 1

0

Works for me.

fiddle

Except that I never use the outdated data type char(n). And neither should you. See:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.