top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How does one implement IF-THEN-ELSE in a select statement?

+2 votes
72 views
How does one implement IF-THEN-ELSE in a select statement?
posted Jun 23, 2015 by Vidhya Sagar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
DECLARE @site_value INT;
SET @site_value = 15;

IF @site_value < 25
   PRINT 'TechOnTheNet.com';
ELSE
   PRINT 'CheckYourMath.com';

GO
answer Jun 24, 2015 by Manikandan J
...