Afficher un message
Vieux 16/07/2007, 19h37   #2
Rik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Newbie question about UNIQUE MySQL v5.0.22

On Mon, 16 Jul 2007 20:28:01 +0200, nelson.salvador@gmail.com
<nelson.salvador@gmail.com> wrote:

> Hi all,
>
> I need some ...
>
> My Example:
>
> Field: Bank Account Nº: 12353545456 & Field: Bank Account Nº: (Empty)
>
> The nº must be unique but could be empty also...
>
> What is the SQL? It's Possible?


Allow NULL values, and use that for unknowns. So not an empty string, not
0, but NULL.

AlTER TABLE table ADD UNIQUE(`bank_acccount`);
--
Rik Wasmus
  Réponse avec citation
 
Page generated in 0,05320 seconds with 9 queries