Thursday, February 25, 2010

LEN with NTEXT

What will be the output of the following scripts if you run them in SQL Server Management Studio?
DECLARE @STR NTEXT
SET @STR = REPLICATE('1',8001)
SELECT LEN(@STR)

A. 8001
B. 8000
C. An error will be generated since the ntext data types are invalid for local variables.
D. An error will be generated since the maximum of LEN function is only 8000

Answer:[C]
Highlight to find out the answer.

No comments:

Post a Comment

Oracle Query