[Cascavel-pm] [OT][MySQL]: Magia com ALTER TABLE

Nelson Ferraz nferraz em phperl.com
Sexta Março 5 19:05:51 CST 2004


Luis Campos de Carvalho wrote:
>>>   ALTER TABLE clientes
>>>     ADD COLUMN dia_vencimento_fatura tinyint(2) unsigned not null
>>>     CHECK( dia_vencimento_fatura >= 1 AND dia_vencimento_fatura <= 31 );
>>
>> Você consegue fazer o ALTER TABLE sem o CHECK?
> 
>   Consigo, claro. Isso é a ANSI SQL/97, se eu não me engano.
>   Meu problema é justamente como validar as informações COM check()...

De acordo com a documentação do MySQL, "the CHECK clause is parsed but 
ignored by all storage engines":

http://www.mysql.com/doc/en/ALTER_TABLE.html

-- 
[]s

Nelson

________________________________________________________________
Nelson Ferraz

GNU BIS: http://www.gnubis.com.br
PhPerl:  http://www.phperl.com




Mais detalhes sobre a lista de discussão Cascavel-pm