討論串[SQL ] postgresql 複合主鍵無法被外鍵參考?
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者alpe (薛丁格的貓)時間17年前 (2008/10/30 21:15), 編輯資訊
0
0
0
內容預覽:
create table tb_master(. "Pkey1" int not null ,. "Pkey2" int not null,. "Pkey3" int not null,. primary key ("Pkey1","Pkey2"). );. create table tb_slav
(還有133個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Bambe (肥兒)時間17年前 (2008/10/30 12:48), 編輯資訊
0
0
0
內容預覽:
create table tb_master(. "Pkey1" int not null ,. "Pkey2" int not null,. "Pkey3" int not null,. constraint pk_pkey primary key ("Pkey1","Pkey2"). );. c
(還有188個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者Bambe (肥兒)時間17年前 (2008/10/27 11:25), 編輯資訊
0
0
0
內容預覽:
我建立一個主資料表,有兩個以上的複合主鍵(用 constraint). 然後在其他的資料表裡,想參考主資料表的某一個主鍵. 而 psql 卻回我說:. -. 錯誤: number of referencing and referenced columns for foreign key disagr
(還有60個字)
首頁
上一頁
1
下一頁
尾頁