Reply to Re: Newbie question about UNIQUE MySQL v5.0.22

Your name:

Reply:


Posted by Ciaran on 07/22/07 11:04

On Jul 15, 12:54 am, "nelson.salva...@gmail.com"
<nelson.salva...@gmail.com> wrote:
> My Example:
> Field: Bank Account Nº: 12353545456
> Field: Bank Account Nº:
>
> The nº must be unique but could be empty also...

If you introduce a UNIQUE constraint on a VARCHAR field, there can
only be one row that has the empty string ("") as its value.

However, if you allow the column to be NULL, you can insert as many
NULL records as you like.

-Ciaran McNulty

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация