Reply to Check constraint - SQL problem

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация