Home >> FAQs/Tutorials >> SQL Server FAQ
SQL Server FAQs - Transact-SQL Boolean Values and Logical Operations
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:
- What Is a Boolean Value?
- What Are Conditional Expressions?
- What Are Comparison Operations?
- How To Perform Comparison on Exact Numbers?
- How To Perform Comparison on Floating Point Numbers?
- How To Perform Comparison on Date and Time Values?
- How To Perform Comparison on Character Strings?
- What To Test Value Ranges with the BETWEEN Operator?
- What To Test Value Lists with the IN Operator?
- What To Perform Pattern Match with the LIKE Operator?
- How To Use Wildcard Characters in LIKE Operations?
- How To Test Subquery Results with the EXISTS Operator?
- How To Test Values Returned by a Subquery with the IN Operator?
- 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...)