Iteratively Perfecting
A Software Developer's notes along the way
Static Pages
Posts
SQL Server links
C# Links
HTML5 Links
Tuesday, July 31, 2007
IF-THEN-ELSE logic in a SELECT statement
SELECT ename, CASE WHEN sal = 1000 THEN 'Minimum wage'
WHEN sal > 1000 THEN 'Over paid'
ELSE 'Under paid'
END AS "Salary Status"
FROM emp
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment