我是數據庫的新手。我用兩張桌子遇到了一個奇怪的問題。請讓我知道解決方案。請測量值低於加入 - 兩張表
一個ProductCentre表 prdcntrId(主鍵),prdcntrname場景
一個ApplicationType表 apptypeid(主鍵) prdcntreid(外鍵ProductCentre) apptypname
ProductCentre table || ApplicationType table
||
prdcntrId prdcntrname || apptypeid prdcntreid apptypname
001 Delhi || 11 001 Busines
002 Mumbai || 12 003 Engg
003 Hyd || 13 001 Soft
14 002 Science
最終結果應該是這樣的 產品中心可以有任何類型的應用程序,如德里可以有許多業務,軟應用程序與孟買相同,hyd
--------------------------------------------------------------------- prdcntrname Busines Engg Soft Science --------------------------------------------------------------------- Delhi 1 0 1 0 --------------------------------------------------------------------- Mumbai 0 1 0 1 --------------------------------------------------------------------- Hyd 0 1 0 0 ---------------------------------------------------------------------
這個解決方案可能來自這兩個表。請幫我在這種情況下
感謝, KK
它被稱爲表旋轉。 – 2010-03-07 18:48:37