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!