---
title: "Fetch Entities Criteria and SQL Equivalence"
slug: "fetch-entities-criteria-and-sql-equivalence"
description: "This document explains the parallels between each element in the Fetch criteria within the Fetch entities step, and SQL database queries, with a helpful chart. "
updated: 2026-06-26T14:07:56Z
published: 2026-06-26T14:07:56Z
canonical: "documentation.decisions.com/fetch-entities-criteria-and-sql-equivalence"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Entities Criteria and SQL Equivalence

## **Overview**

A **Fetch Entities** (Database Entity) step is used to pull data from the database that matches the **Fetch Criteria** input**.** The **Fetch Criteria** section allows users to input the criteria that the data must meet to be fetched and are equivalent to SQL queries within a database.

To use Fetch Entities to pull from a SQL database, users will need to select a previously created data type from the Type Name field under the ENTITY FETCH DEFINITION category that corresponds with the information that will be searched in the database. For more information, see [Retrieving Entities](/version-10/docs/retrieving-entities-with-the-fetch-entities-flow-step). 

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1778851106275.png)

## Query Match Type SQL Equivalent

The **Query Match Type** field contains the query operators that are used to fetch specific data that match a specified condition. In a SQL query statement, these operators are used in the **"WHERE"** clause. The table below lists the Query Match Types, their equivalence in SQL, and an example**.**

| Query Match Type | SQL Equivalent | Example | Description |
| --- | --- | --- | --- |
| Equals | Equal (=) | SELECT (column_names) FROM (table) WHERE (column_names) = {value}; | Used for equality tests within two expressions. |
| Contains | CONTAINS | SELECT * FROM(table) WHERE CONTAINS (column_names) , (text_Value); | Does a full-text search on full-text indexed columns containing character-based data types. |
| DoesNotEqual | Not equal (<>, !=) | SELECT (column_names) FROM (table) WHERE (column_names) <> {value}; | Checks if two expressions are not equal. |
| GreaterThanOrEqualTo | Greater Than or Equals To (>=) | SELECT (column_names) FROM (table) WHERE (column_names) >= {value}; | Used to test whether an expression is either greater than or equal to another one. |
| LessThanOrEqualTo | Less Than or Equals To (<=) | SELECT (column_names) FROM (table) WHERE (column_names) <= {value}; | Used to test whether an expression is either greater than or equal to another one. |
| GreaterThan | Greater Than (>) | SELECT (column_names) FROM (table) WHERE (column_names) > {value}; | Used to test whether an expression is greater than another one. |
| LessThan | Less Than(<) | SELECT (column_names) FROM (table) WHERE(column_names) < {value}; | Used to test whether an expression is less than another one. |
| Exists | EXIST | SELECT (column_names) FROM {table} WHERE EXISTS (subquery); | Checks the existence of a result of a Subquery. It pulls data that is TRUE if the subquery returns one or more records. |
| DoesNotExist | NOT EXIST | SELECT (column_names) FROM (table) WHERE NOT EXISTS (subquery); | Used for existence determination but works opposite of **EXIST** operator. It will be TRUE if there are no records are returned. |
| IsNotNull | IS NOT NULL | SELECT column_names FROM table_name WHERE column_name IS NOT NULL; | Tests for empty values. |
| IsNull | IS NULL | SELECT column_names FROM table_name WHERE column_name IS NULL; | Tests for non-empty values. |
| StartsWith | LIKE Value% | SELECT * FROM (table) WHERE (Column) LIKE 'S%'; | Finds any record that starts with the given value. |
| EndsWith | LIKE %Value | SELECT * FROM (table) WHERE (Column) LIKE '%S'; | Finds any record that ends with the given value. |
| DoesNotContain | NOT IN %value% NOT LIKE %value% | SELECT * FROM (table) WHERE (Column) NOT LIKE '%text%'; | Finds records that do not contain a specific value. |
| DoesNotEndWith | NOT IN %value NOT LIKE %value | SELECT * FROM (table) WHERE (Column) NOT LIKE '%text'; | Finds records that do not end contain a specific value. |
| DoesNotStartWith | NOT IN value% NOT LIKE value% | SELECT * FROM (table) WHERE (Column) NOT LIKE 'text%'; | Finds records that do not start contain a specific value. |
| Input Data Alias | alias | SELECT column_name AS alias_name FROM table_name; | Gives input criteria a separate name from the default field name. Allows differentiation between criteria set on the same field. |
| IsInList | IN | SELECT * FROM (table) WHERE column_name IN (value1, value2) | Finds records that match to any of the specified values |
| NotInList | NOT IN | SELECT * FROM (table) WHERE column_name NOT IN (value1, value2) | Finds records that do not match any of the specified values |
