Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Brisbane, Australia
    Posts
    13

    Unanswered: Boolean Data Type??

    Hi,

    Is there a boolean data type in Oracle (9i), if not is there a way to make one??

    I have been using SQL Server 2K and it has one, it is really just a bit, 1 = true, and 0 = false.

    I have no idea how to make my own types so could someone plz point me in the right direction.

    Nicholas Orr

  2. #2
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1
    I think the easiest way is to take a NUMBER(1) field.

    Martin

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Originally posted by preisl
    I think the easiest way is to take a NUMBER(1) field.

    Martin
    Agreed. Or a VARCHAR2(1). And you should add a check constraint like "CHECK( col1 IN (0,1) )" or "CHECK( col1 IN ('T','F') )"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •