Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for Delphi 5 » SQL Reference » Operators |
Operator | Description |
< | Determines if a value is less than another value. |
> | Determines if a value is greater than another value. |
= | Determines if a value is equal to another value. |
<> | Determines if a value is not equal to another value. |
>= | Determines if a value is greater than or equal to another value. |
<= | Determines if a value is less than or equal to another value. |
SELECT * FROM Orders WHERE (ItemsTotal >= 1000)
SELECT * FROM Orders WHERE NOT (ItemsTotal >= 1000)
Operator | Description |
[NOT] BETWEEN | Compares a value to a range formed by two values. |
[NOT] IN | Determines whether a value exists in a list of values. |
[NOT] LIKE | Compares, in part or in whole, one value with another. |
IS [NOT] NULL | Compares a value with an empty, or NULL, value. |
value1 [NOT] BETWEEN value2 AND value3
10 BETWEEN 1 AND 5
10 NOT BETWEEN 1 AND 5
SELECT SaleDate FROM Orders WHERE (SaleDate BETWEEN '1998-01-01' AND '1998-12-31')
value [NOT] IN (value_set)
SELECT c.Company, c.State FROM Customer c WHERE (c.State IN ('CA', 'HI'))
value [NOT] LIKE [substitution_char] comparison_value [substitution_char] ESCAPE escape_char
SELECT * FROM Customer WHERE (Company LIKE 'Adventure Undersea')
SELECT * FROM Customer WHERE (Company LIKE 'A%')
SELECT Words FROM Dictionary WHERE (Words LIKE 'b_n')
SELECT ID, Description FROM Items WHERE (Description LIKE '%10\%%') ESCAPE '\'
column_reference IS [NOT] NULL
SELECT * FROM Customer WHERE (InvoiceDate IS NULL)
Operator | Description |
CASE | Evaluates a series of boolean expressions and returns the matching result value. |
CASE WHEN boolean expression THEN value [WHEN boolean expression THEN value] [ELSE] value END
SELECT CardType, CASE WHEN Upper(CardType)='A' THEN 'American Express' WHEN Upper(CardType)='M' THEN 'Mastercard' WHEN Upper(CardType)='V' THEN 'Visa' WHEN Upper(CardType)='D' THEN 'Diners Club' END AS CardDesc, SUM(SalesAmount) AS TotalSales FROM Transactions GROUP BY CardType ORDER BY TotalSales DESC
CASE expression WHEN expression THEN value [WHEN expression THEN value] [ELSE] value END
SELECT CardType, CASE Upper(CardType) WHEN 'A' THEN 'American Express' WHEN 'M' THEN 'Mastercard' WHEN 'V' THEN 'Visa' WHEN 'D' THEN 'Diners Club' END AS CardDesc, SUM(SalesAmount) AS TotalSales FROM Transactions GROUP BY CardType ORDER BY TotalSales DESC
Operator | Description |
+ | Add two numeric values together numeric value. |
- | Subtract one numeric value from another numeric value. |
* | Multiply one numeric value by another numeric value. |
/ | Divide one numeric value by another numeric value. |
MOD | Returns the modulus of the two integer arguments as an integer |
SELECT (itemstotal * 0.0825) AS Tax FROM orders
SELECT (n.numbers * (n.multiple + 1)) AS Result FROM numbertable n
Operator | Description |
+ | Concatenate two string values together. |
|| | Concatenate two string values together. |
SELECT (LastName + ', ' + FirstName) AS FullName FROM Employee
Operator | Description |
+ | Adding days or milliseconds to date, time, or timestamp values. |
- | Subtracting days or milliseconds from date, time, or timestamp values, or subtracting two date, time, or timestamp values to get the difference in days or millseconds. |
SELECT InvoiceDate, (InvoiceDate + 30) AS DueDate, BalanceDue FROM Invoices WHERE InvoiceDate BETWEEN '1999-01-01' AND '1999-01-31'
Operator | Description |
NOT | NOT a boolean value. |
AND | AND two boolean values together. |
OR | OR two boolean values together. |
SELECT * FROM Reservations WHERE ((ReservationDate < '1998-01-31') OR (Paid = TRUE))
SELECT Shape, Color FROM Objects WHERE (Color = 'Red' OR Shape = 'Round') AND Color = 'Blue'
SELECT Shape, Color FROM Objects WHERE Color = 'Red' OR Shape = 'Round' AND Color = 'Blue'
SELECT * FROM reservations WHERE (NOT (Paid = TRUE))
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |