RE: querying check constraints
I don't understand your question -Original Message- From: Sukhdev Sethi [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:20 AM To: [EMAIL PROTECTED] Subject: querying check constraints Hi, I have created a table as below: create table myTable ( Field1 int auto_increment not null, Field2 varchar(25) not null, Field2 enum('Fair','Good','Excellent'), primary key (Field1)) auto_increment=1 I would like to know how to query the table for only the enum values I have created. Sukhdev. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ - 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 - 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
querying check constraints
Hi, I have created a table as below: create table myTable ( Field1 int auto_increment not null, Field2 varchar(25) not null, Field2 enum('Fair','Good','Excellent'), primary key (Field1)) auto_increment=1 I would like to know how to query the table for only the enum values I have created. Sukhdev. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ - 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
CHECK constraints
Neil, Thursday, February 21, 2002, 12:18:27 AM, you wrote: NZ> Hello, NZ> I searched the manual but it seems like MySQL does not support ANSI SQL NZ> CHECK constraints. These are often used to check that rows inserted into NZ> tables meet specified criteria. For example table T created as follows NZ> CREATE TABLE T ( NZ> X INT, NZ> CHECK (X <= 10) NZ> ); Yes, you are right. CHECK clause do nothing. Look at: http://www.mysql.com/doc/C/R/CREATE_TABLE.html -- For technical support contracts, goto https://order.mysql.com/ This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - 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
CHECK constraints
Hello, I searched the manual but it seems like MySQL does not support ANSI SQL CHECK constraints. These are often used to check that rows inserted into tables meet specified criteria. For example table T created as follows CREATE TABLE T ( X INT, CHECK (X <= 10) ); has a check constraint so that if the user tried to insert a row with the following statement: INSERT INTO T VALUES (11); then the DBMS reports an error but if on the other hand the user enters INSERT INTO T VALUES (6); then 6 <= 10 so the insertion works fine. It would be nice if mysql supported this feature, but thanks for mysql. Have a nice day, Neil - 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