|
Posted by Mary Walker on 07/23/05 12:02
Hi,
I am new to database development and am writing a database as part of a
university course
I have created a table as below called CableWire - the table is created ok.
CREATE TABLE CableWire
(CableWireID CHAR(7),
BSstandard CHAR(16),
Colour VARCHAR(16),
Material VARCHAR(16),
MetresInStock INTEGER,
PRIMARY KEY (CableWireID));
However when I try to alter the table by adding a CHECK constraint:
ALTER TABLE CableWire
ADD CHECK (MetresInStock >= 0);
I get a pop-up box: "Line: 21
SQLSTATE = 37000
[Microsoft][ODBC dBase Driver] Syntax error in field definition, Continue?"
(line 21 equated to the 2nd of those 2 lines). The syntax seems perfectly
acceptable to me. Any help appreciated.
Regards,
Mary
Navigation:
[Reply to this message]
|