Bit data

  • A good question.

  • Thank you, Anirban and David.

    ):-D

  • Dr. Diana Dee (5/8/2008)


    Thank you, Anirban and David.

    ):-D

    You are welcome........:)

  • This was a very good question. I did not know that 'true' and 'false' can not be used with bit columns in SQL 2005. I can now stop having to write DECLARE @TRUE BIT SET @TRUE = 1 statements in my procedures:)

  • sql 2000 with error

    Msg 245, Level 16, State 1, Line 1

    Syntax error converting the varchar value 'true' to a column of data type bit.

    sql 2005 without error

  • This is a great question, but the answer would be no rows returned because they would still be all NULL since you did not insert or update any rows before the select.

    The answer that is supplied as the correct answer would only be correct if you added a step like this:

    USE AdventureWorks

    UPDATE HumanResources.Employee

    SET SalariedFlag = 'true'

    I want my point for the correct answer:

    A result set with no value (a blank result) will be returned.

  • Good informative question...This will at least make people to read whole question before replying and commenting......:)

Viewing 7 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic. Login to reply