1
edit
Changes
J.Y.S
,→DDL Statements (CREATE TABLE)
CREATE TABLE PROPERTY
(
PropertyID NUMBER(6) CONSTRAINT property_propertyid_pk PRIMARY KEY,
Street VARCHAR2(40) NOT NULL,
City VARCHAR2(30) NOT NULL,
Province CHAR(2) NOT NULL,
PostalCode CHAR(6) NOT NULL,
Bedrooms NUMBER(1) NOT NULL, CONSTRAINT property_bedrooms_ck CHECK Bathrooms NUMBER(Bedrooms BETWEEN 1 AND 9) NOT NULL, Bathrooms ListingPrice NUMBER(6) NOT NULL, AreaID NUMBER(14) NOT NULL, CONSTRAINT property_bathrooms_ck property_propertyid_pk PRIMARY KEY(PropertyID), CONSTRAINT property_bedrooms_ck CHECK(Bathrooms Bedrooms BETWEEN 1 AND 9), ListingPrice NUMBERCONSTRAINT property_bathrooms_ck CHECK(6Bathrooms BETWEEN 1 AND 9) NOT NULL, CONSTRAINT property_listingprice_ck CHECK(ListingPrice BETWEEN 1 AND 4999999), AreaID NUMBER(4) NOT NULL CONSTRAINT property_areaid_fk FOREIGN KEY(AreaID) REFERENCES AREA(AreaID)
);
</pre>