Skip to main content Link Menu Expand (external link) Document Search Copy Copied

SQL Expressions

Table of contents

Before you begin



FeatureBase identifiers (including object names such as databases, tables and columns) start with a lower-case alphabetic character and can include:

  • lower-case alphabetic characters
  • numbers 0-9
  • dash - and underscore _ characters.



Syntax Example Result
expr [NOT] LIKE expr SELECT * FROM products WHERE prodlist LIKE 'pen'; ballpen, pencil, playpen
expr IS [NOT] null SELECT * FROM services WHERE price IS null; free delivery on orders over $50
expr [NOT] between expr AND expr SELECT * from Products WHERE Price BETWEEN 10 AND 20; fountain pen, notepad, rubber ball
expr [NOT] IN ([SELECT_stmnt | expr,...]) Select * from Products where product_ID NOT IN (SELECT product_ID from Sales where product_name LIKE ear) gold-plated earplugs


Literals are explicitly specified fixed values that conform to a specific data type:

String literal BNF diagram Additional information
date expr TIMESTAMP() data type
decimal   DECIMAL() data type
set expr IDSET data type
STRINGSET data type
* IDSETQ data type
string   STRING data type
tuple expr TUPLE() function

[unary_op] expr

expr binary_op expr


BNF diagram Additional information
expr SQL Functions

CAST <expr> AS <data-type>

Syntax Example Result Additional information
CAST <expr> AS <data-type> SELECT CAST (25.65 AS int); 25 CAST function


BNF diagram Description Additional information
expr A SQL Statement nested within another SQL statement SELECT Statement


BNF diagram Additional information
expr CASE expression