- Para alterar a restrição Not Null para Null e vice-versa, no InterBase, deve-se usar o Update.
Sintaxe b�sica:
UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = Numero para Null ou Not Null WHERE RDB$FIELD_NAME = 'NomeDaColunaComLetrasMaiusculas' AND RDB$RELATION_NAME = 'NomeDaTabelaComLetrasMaiusculas'
Onde:
Numero para Null ou Not Null:
informe 0 para Null ou 1 para Not Null
Exemplo:
A seguinte instru��o irá atribuir a regra Not Null ao campo codigo da tabela cliente:
update RDB$RELATION_FIELDS
set RDB$NULL_FLAG = 1 where RDB$FIELD_NAME = 'CODIGO'
and RDB$RELATION_NAME = 'CLIENTE'
|