SQL FOREIGN KEY Constraint on ALTER TABLE
- ์ธ๋ํค ์ถ๊ฐํ๊ธฐ
MySQL / SQL Server / Oracle / MS Access:
ALTER TABLE Orders
ADD FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)
ADD FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)
- ์ธ๋ํค ์ด๋ฆ ์ง์ ํด์ฃผ๊ธฐ
MySQL / SQL Server / Oracle / MS Access:
ALTER TABLE Orders
ADD CONSTRAINT fk_PerOrders
FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)
ADD CONSTRAINT fk_PerOrders
FOREIGN KEY (P_Id)
REFERENCES Persons(P_Id)
To DROP a FOREIGN KEY Constraint
- ์ธ๋ํค ์ญ์ ํ๊ธฐ
MySQL:
ALTER TABLE Orders
DROP FOREIGN KEY fk_PerOrders
DROP FOREIGN KEY fk_PerOrders
SQL Server / Oracle / MS Access:
ALTER TABLE OrdersDROP CONSTRAINT fk_PerOrders
'๐ป Programming > Oracle 11g' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ค๋ผํด/oracle] Oracle Database Character set ๋ณ๊ฒฝ(EUC-KR์ UTF8 ๋ณ๊ฒฝ) (0) | 2015.04.20 |
---|---|
[์ค๋ผํด/oracle] select ... for update (0) | 2015.04.20 |
[์ค๋ผํด/SQL] ํ ์ด๋ธ์ ์ปฌ๋ฝ ์ถ๊ฐ/์ญ์ ํ๊ธฐ (0) | 2015.04.20 |
[์ค๋ผํด/oracle] Insert ์๋ ๋์ด๊ธฐ (0) | 2015.04.20 |
[์ค๋ผํด/oracle] Partitioned Tables and Indexes ( ํ ์ด๋ธ ๋ฐ ์ธ๋ฑ์ค ํํฐ์ ) (0) | 2015.04.20 |