On Tue, Apr 10, 2001 at 12:48:26PM +0200, Guerin Damien wrote:
> Hi,
>
> How use CHECK constraint in a CREATE TABLE declaration ??
> The language used is MySQL
> Indeed, i try many attempt but no success... Somebody could help me ??
>
> I try to do that :
>
> create table Picsou (
> name varchar(5)
> check (name=='fifi' or name=='riri' or name=='loulou')
> )
> ;
>
> But ERROR !!
>
> Maybe there are some website to explain but i haven't found.
Try reading the MySQL manual, Reference >> CREATE TABLE..
* The `FOREIGN KEY', `CHECK', and `REFERENCES' clauses don't
actually do anything. The syntax for them is provided only for
compatibility, to make it easier to port code from other SQL
servers and to run applications that create tables with references.
G'luck,
Peter
--
I had to translate this sentence into English because I could not read the original
Sanskrit.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php