nomadsoul
11-14-2008, 11:24 PM
I get errors when creating the below table except when I remove:
PAYMENT_DATE DATE NOT NULL
CHECK(PAYMENT_DATE >= DATE('1969-12-31')),
Then, everything is fine. Table created no problem.
I don't see anything wrong with the syntax. Could the date datatype be incompatible with the version of MySql I'm using (I'm using FQ's MySql)?
Really confused with this. I don't even know how to ask google about this.
I'm probably overlooking the obvious as usual.
CREATE TABLE PENALTIES
(PAYMENTNO INTEGER NOT NULL PRIMARY KEY,
PLAYERNO INTEGER NOT NULL,
PAYMENT_DATE DATE NOT NULL
CHECK(PAYMENT_DATE >= DATE('1969-12-31')),
AMOUNT DECIMAL(7,2) NOT NULL
CHECK (AMOUNT > 0),
FOREIGN KEY (PLAYERNO) REFERENCES PLAYERS (PLAYERNO))
;
PAYMENT_DATE DATE NOT NULL
CHECK(PAYMENT_DATE >= DATE('1969-12-31')),
Then, everything is fine. Table created no problem.
I don't see anything wrong with the syntax. Could the date datatype be incompatible with the version of MySql I'm using (I'm using FQ's MySql)?
Really confused with this. I don't even know how to ask google about this.
I'm probably overlooking the obvious as usual.
CREATE TABLE PENALTIES
(PAYMENTNO INTEGER NOT NULL PRIMARY KEY,
PLAYERNO INTEGER NOT NULL,
PAYMENT_DATE DATE NOT NULL
CHECK(PAYMENT_DATE >= DATE('1969-12-31')),
AMOUNT DECIMAL(7,2) NOT NULL
CHECK (AMOUNT > 0),
FOREIGN KEY (PLAYERNO) REFERENCES PLAYERS (PLAYERNO))
;