List:General Discussion« Previous MessageNext Message »
From:Micheal Mc Evoy Date:March 23 1999 12:58am
Subject:Re: Binary type? True/False, Yes/No, On/Off
View as plain text  
Enum is the best way to handle this, it's fairly descriptive in the table.

CREATE TABLE table_name (
.
.
.
contact enum('Y', 'N') DEFAULT 'N' NOT NULL
.
.
)

Micheal


On Mon, 22 Mar 1999, Daevid Vincent wrote:

>Date: Mon, 22 Mar 1999 15:10:54 -0800
>From: Daevid Vincent <daywalker@stripped>
>To: mysql@stripped
>Subject: Binary type? True/False, Yes/No, On/Off
>
>Is there a preferred way to make a field in a SQL database that only has two
>options, such as Yes/no, On/Off, True/False?
>
>I have a field that would equate to a checkbox on a web page. Either the person
>wants to be contacted or they don't.
>What is the best way to create that field in mySQL? Using a TINYINT? CHAR? ENUM?
>
>It seems there should be a field/data type for this kind of "flag" scenario.
>
>Daevid Vincent.
>What is http://TheMatrix.com
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread809@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail mysql-unsubscribe@stripped instead.
>

---
Micheal Mc Evoy                                    mjmc@stripped
                                             http://www.whitepine.com

WhitePine Consulting supports the Free Software Foundation and it ideals
by promoting, using and supporting Open Source, GNU and GPL'd Software.

Thread
selecting the ENUM valuesChris Cochella22 Mar
  • Re: selecting the ENUM valuesThimble Smith22 Mar
  • Appending to a SET()Daevid Vincent22 Mar
    • Re: Appending to a SET()Paul DuBois22 Mar
  • Binary type? True/False, Yes/No, On/OffDaevid Vincent23 Mar
    • Re: Binary type? True/False, Yes/No, On/OffMicheal Mc Evoy23 Mar