Sunday, May 29, 2005

sql: null, empty rows

DECLARE @Message VARCHAR(100)

SET @Message = 'Michael'

SELECT TOP 1 @Message = Message FROM BroadcastedPendingMessage ORDER BY DateTimeCreated


PRINT @Message
----------
what will be the output of @Message if the BroadcastedPendingMessage has no rows?

is it NULL or Michael

answer:

Michael

0 Comments:

Post a Comment

<< Home