MySQL Forums
Forum List  »  Italian

Check in Create table
Posted by: Davide Dal Frà
Date: February 18, 2011 05:04AM

Sto provando da alcuni giorni a creare tabelle (sia MyIsam che InnoDB) con l'opzione check nella create table:

Esempio:

CREATE TABLE test ( campo varchar ( 1 ), check (campo='R' or campo='T') );

Poi provo a fare una insert:

insert into test values ('A');
Query OK, 1 row affected (0.00 sec)
mysql> show warnings;
Empty set (0.00 sec)

mysql> show errors;
Empty set (0.00 sec)

mysql> select * from test;
+-------+
| campo |
+-------+
| A |
+-------+



Avendo impostato il CHECK sul field 'campo' come mai la insert avviene in modo corretto?



Saluti,


Davide Dal Frà

Options: ReplyQuote


Subject
Views
Written By
Posted
Check in Create table
4963
February 18, 2011 05:04AM
1620
March 09, 2011 07:08PM
1481
April 05, 2011 03:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.