How to make a foreign key in pgAdmin ?
I want to make a foreign key that references
a primary key.
A primary key is of type "serial",
does that mean that foreign key should be "integer" or
some other type ?
How to make a foreign key in pgAdmin ? I want to make a foreign key that references a primary key. A primary key is of type "serial", does that mean that foreign key should be "integer" or some other type ?
Yes, your foreign key should be of type integer. Serial is just a shortcut for creating an integer with an associated sequence and default setting.
-Eric
Есть вопросы? Напишите нам!
✖
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.