# WHERE Clause

## >=, <=, >, <, [ NOT ] LIKE, [ NOT ] IN, IMPLEMENTS (relational operations)

The WHERE clause specifies search conditions, that remove unwanted data from the query result. The following operators, are in order of precedence. The operators are evaluated in the specified order:

    SELECT * FROM java.lang.String s WHERE s.count >= 100

    SELECT * FROM java.lang.String s WHERE toString(s) LIKE ".*day"

    SELECT * FROM java.lang.String s WHERE s.value NOT IN dominators(s)

    SELECT * FROM java.lang.Class c WHERE c IMPLEMENTS org.eclipse.mat.snapshot.model.IClass

## =, != (equality operations)

    SELECT * FROM java.lang.String s WHERE toString(s) = "monday"

## AND (conditional AND operation)

    SELECT * FROM java.lang.String s WHERE s.count > 100 AND s.@retainedHeapSize > s.@usedHeapSize

## OR (conditional OR operation)

    SELECT * FROM java.lang.String s WHERE s.count > 1000 OR s.value.@length > 1000

Operators can be applied to expressions, constant literals and sub queries. Valid expressions are explained in the next sections.

## Literal Expression

Boolean, String, Integer, Long, Character and null literals:

    SELECT * FROM java.lang.String s
             WHERE ( s.count > 1000 ) = true
             WHERE toString(s) = "monday"
             WHERE dominators(s).size() = 0
             WHERE s.@retainedHeapSize > 1024L
             WHERE s.value != null AND s.value.@valueArray.@length >= 1 AND s.value.@valueArray.get(0) = 'j'
             WHERE s.@GCRootInfo != null

Parent topic: OQL Syntax