Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-08-09 : 08:11:00
|
| Bernardo writes "In MySQL the statement"Select 1>2;" returns False (and obviously True for true statements).I need this to work in SQL, do you know how?RegardsBernardo Zamora" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-08-09 : 08:12:25
|
| There is no True or False value in SQL Server, but you can do this:SELECT CASE WHEN 1>2 THEN 'False' ELSE 'True' ENDThe CASE expression is explained in more detail in SQL Server Books Online, also read these articles:http://www.sqlteam.com/SearchResults.asp?SearchTerms=case |
 |
|
|
|
|
|