Error in today's QotD?

  • Here's the question:

    What is the maximum size of a row in the following table

    CREATE TABLE tbPersonalDetails(

    PK_ID INT NOT NULL PRIMARY KEY,

    [Name] NVARCHAR(50) NOT NULL,

    Married BIT NOT NULL,

    DOB SMALLDATETIME NOT NULL,

    BachelorsDegree BIT NOT NULL,

    MastersDegree BIT NOT NULL,

    Profession NVARCHAR(100) NOT NULL,

    Retired BIT NOT NULL,

    Age AS (DATEDIFF(yy,DOB,GETDATE()))

    )

    GO

    The options are 162 bytes, 159 bytes, 166 bytes, or 157 bytes.

    Well, the two NVARCHAR columns add up to 300 already (unicode uses 2 bytes per character) so all the options must be wrong! Oops!

  • you are correct and I've redone the answers and explanation as well as awarded points back.

    Steve

Viewing 2 posts - 1 through 1 (of 1 total)

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