Is there any different for foreign key to be serial instead of integer
В списке pgsql-general по дате отправления:
| От | Yan Cheng Cheok |
|---|---|
| Тема | Is there any different for foreign key to be serial instead of integer |
| Дата | |
| Msg-id | 889238.85056.qm@web65703.mail.ac4.yahoo.com обсуждение исходный текст |
| Ответы |
Re: Is there any different for foreign key to be serial
instead of integer
Re: Is there any different for foreign key to be serial instead of integer |
| Список | pgsql-general |
I came across a lot of similar example for foreign key CREATE TABLE orderinfo ( orderinfo_id serial , customer_id integer NOT NULL, date_placed date NOT NULL, date_shipped date , shipping numeric(7,2) , CONSTRAINT orderinfo_pk PRIMARY KEY(orderinfo_id), CONSTRAINT orderinfo_customer_id_fk FOREIGN KEY(customer_id) REFERENCES customer(customer_id) ); instead of let customer_id being type as integer, can i let it be serial? is there any difference? if the table referenced by customer_id is having primary key typed big serial, customer_id shall be declared as bigint ? Thanks
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера