Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions > Condition >

Quotation Marks in Conditions

When you compare a column expression with a constant expression in any comparison condition, observe the following rules:

Otherwise, you might get unexpected results.

The following example shows the correct use of quotation marks in comparison conditions. Here the ship_instruct column has a character data type, the order_date column has a date data type, and the ship_weight column has a numeric data type.

SELECT * FROM orders
   WHERE ship_instruct = 'express'
   AND order_date > '05/01/98'
   AND ship_weight < 30
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]