Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    191

    Unanswered: Sql Server Datatype

    I have a access table that I need to create in SQL Server, there are field with yes/no, in sql server what datatype would I use?

    Thanks

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by milan1115
    I have a access table that I need to create in SQL Server, there are field with yes/no, in sql server what datatype would I use?

    Thanks
    Bit datatype will be suitable for this field.Bit can store 0,1 or null.
    You can store yes for 1,and no for 0.
    Joydeep

  3. #3
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    47
    if you use the bin data type you can set it to NOT NULL which will limit to 0 or 1.

    Alternatively you can use data type such as int, or char(1) and use constraints to limit the value to 'Y' or 'N'.
    -----------------
    KH


Posting Permissions

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