Answer the question
In order to leave comments, you need to log in
What is the correct practice for using a unique identifier (Postgres SERIAL)?
Good afternoon guys.
What would be the correct practice to use a unique id in my case?
There is a table with questions:
create table questions
(
id serial not null
constraint questions_pkey
primary key,
title varchar(25) not null
);
create table users
(
question_id integer
constraint users_question_id_fkey
references questions,
a varchar(25)
);
Answer the question
In order to leave comments, you need to log in
As you understand, the answer "no" or "yes" is entered in the "a" field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question