Archive for December, 2015

SQL ADD,DROP COLUMN+ FK

DROP
ALTER TABLE ASSIGNMENT_DETAIL DROP COLUMN NEIGHBOURHOOD_ID;
ALTER TABLE ASSIGNMENT_DETAIL DROP COLUMN NEIGHBOURHOOD_STREET_ID;

ADD
ALTER TABLE ORGANIZATION_PERSON ADD ASSIGNMENT_ID NUMBER(38,0);
ALTER TABLE ORGANIZATION_PERSON ADD ASSIGNMENT_STATUS NUMBER(38,0);

ADD FK

ALTER TABLE ORGANIZATION_PERSON
ADD CONSTRAINT FK_Asignment_ID FOREIGN KEY (ASSIGNMENT_ID)
REFERENCES ASSIGNMENT_DETAIL(ID);

Advertisements

, , , ,

Leave a comment