Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    4

    Unanswered: About Sybase BIT TYPE

    Hi!
    I'am a new user about Sybase.
    who can tell me the default value about Sybase's BIT TYPE's field.

    thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Bit type is zero or non 1 (= non zero).

    So you can include values like 0, 1, 2 , ... but the table will stock 0,1,1,... The default follow the same rule:

    E.g.
    Code:
    create table #t (i int, b bit default 5)
    go
    insert into #t values(1,0) -- stock (1,0)
    insert into #t values(2,2) -- stock (2,1)
    insert into #t values(3,1) -- stock (3,1)
    insert into #t (i) values(4) -- stock (4,1)
    go
    F. Celaia
    DBA Sybase/DB2/Oracle/MS-SQL

Posting Permissions

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