Article View: cn.bbs.comp.database
Article #701[MSSQL]Question of the Day
From: Galaxy��VOLUNTEERS��Database
Date: Fri, 05 Dec 2008 11:42
Date: Fri, 05 Dec 2008 11:42
20 lines
1293 bytes
1293 bytes
What is the Output of the following IF(NULL IN (34, 35, NULL))PRINT 'TRUE' IF(34 NOT IN (35, 36, NULL))PRINT 'FALSE' By muzahm Answer: Command(s) completed successfully. Explanation: Since NULL is an unknown entity, the result of comparing two unknowns is always false. This means that the PRINT statements are never executed as the result of the IF statement is always false. Ref: IF..ELSE - http://msdn.microsoft.com/en-us/library/ms182717.aspx -- Welcome to Database Board ��ӭ������ݿ�� http://bbs.sjtu.edu.cn/bbsdoc?board=database [m[1;32m�� ��Դ:����ˮ˼Դ bbs.sjtu.edu.cn��[FROM: 207.46.55.29][m
Technical Details
Message-ID:
<4dK9EC$beg@bbs.sjtu.edu.cn>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!news.isoc.lu!news.shec6.edu.cn!SJTUShow Full Headers
Complete Article Headers
X-Google-Thread: 101948,7343c037d9100f8b,start X-Google-Attributes: gid101948,domainid0,public,usenet X-Google-Language: ENGLISH,GB Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!news.isoc.lu!news.shec6.edu.cn!SJTU From: Dem.bbs@bbs.sjtu.edu.cn (Galaxy��VOLUNTEERS��Database) Newsgroups: cn.bbs.comp.database Subject: [MSSQL]Question of the Day Date: 05 Dec 2008 11:42:48 GMT Organization: ��ˮ˼Դ Message-ID: <4dK9EC$beg@bbs.sjtu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: database/M.1228477356.A