Home >> FAQs/Tutorials >> SQL Server FAQ

SQL Server FAQs - Transact-SQL Boolean Values and Logical Operations

By: FYIcenter.com

A collection of 14 FAQs on Transact-SQL language Boolean values and logical operations. Clear answers are provided with tutorial exercises on getting Boolean values with comparison operations; CASE expressions; BETWEEN and IN comparisons; pattern match with LIKE operator; EXISTS and IN subquery expressions; AND and OR logical operations. Topics included in this FAQ are:

  1. What Is a Boolean Value?
  2. What Are Conditional Expressions?
  3. What Are Comparison Operations?
  4. How To Perform Comparison on Exact Numbers?
  5. How To Perform Comparison on Floating Point Numbers?
  6. How To Perform Comparison on Date and Time Values?
  7. How To Perform Comparison on Character Strings?
  8. What To Test Value Ranges with the BETWEEN Operator?
  9. What To Test Value Lists with the IN Operator?
  10. What To Perform Pattern Match with the LIKE Operator?
  11. How To Use Wildcard Characters in LIKE Operations?
  12. How To Test Subquery Results with the EXISTS Operator?
  13. How To Test Values Returned by a Subquery with the IN Operator?
  14. What Are Logical/Boolean Operations?

Please note that all answers and tutorials are based on MS SQL Server 2005. To follow tutorials in this collection, you should connect to SQL server as a regular user who has enough permissions to run simple Transact-SQL statements. Some tutorial exercises use the sample database AdventureWorksLT provided by Microsoft.

For questions on Transact-SQL language, see the other FAQ collections.

(Continued on next topic...)

Related Articles:


Other Tutorials/FAQs:


Related Resources:


Selected Jobs: