# ZCQL -------------------------------------------------------------------------------- title: "Introduction" description: "ZCQL is Catalyst's own query language modelled after familiar query languages that you can use to query your app's database efficiently." last_updated: "2026-11-03T07:48:52.000Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/introduction/" service: "CloudScale" -------------------------------------------------------------------------------- # ZCQL ## Introduction Catalyst CloudScale ZCQL serves as Catalyst’s own query language, similar to [MySQL](https://www.mysql.com/) or [PostgreSQL](https://www.postgresql.org/). It is used to perform data manipulations within the [Catalyst Data Store](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/introduction/). As a query engine powered by Catalyst, ZCQL enables developers to work with data using familiar SQL-like syntax while handling complex queries with high efficiency and scalability. You can perform the following operations on the tables in your Data Store using ZCQL: * **Retrieval:** Obtaining records from existing tables * **Insertion:** Inserting records into the existing columns of an existing table * **Updating:** Updating the value of existing columns in an existing table * **Deletion:** Deleting records from an existing table You can execute a variety of DML queries using ZCQL to obtain or manipulate data based on specific criteria by using various clauses and statements such as the SQL `Join` clauses, `Groupby` statements, `OrderBy` statements, and the `WHERE` and `HAVING` clauses. ZCQL also supports several built-in SQL numeric functions that help you execute arithmetic operations easily. You can implement ZCQL queries in your Catalyst application's source code, such as in the functions or the client component. For example, you pass a ZCQL query in a function's body to retrieve data from a table in the Data Store and process it further. The Catalyst console also provides a ZCQL query execution window, where you can execute queries and view the responses. This allows you to test ZCQL queries easily, before implementing them in your application. ### SDK and API documentation Catalyst offers ZCQL in the Java, Node.js, Python, Web, Android, iOS, and Flutter SDK packages, and as an API. For code samples on executing ZCQL queries in these programming environments, refer to these help pages: * [Execute ZCQL Query - Java SDK](https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - Node.js SDK](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - Python SDK](https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - Web SDK](https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - Android SDK](https://docs.catalyst.zoho.com/en/sdk/android/v2/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - iOS SDK](https://docs.catalyst.zoho.com/en/sdk/ios/v2/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - Flutter SDK](https://docs.catalyst.zoho.com/en/sdk/flutter/v2/cloud-scale/zcql/execute-zcql-query/) * [Execute ZCQL Query - API](https://docs.catalyst.zoho.com/en/api/code-reference/cloud-scale/zcql/execute-zcql-query/#ExecuteZCQLQuery) > **Note:** * From **December 01st, 2024**, all your current projects in all your [Orgs](https://docs.catalyst.zoho.com/en/getting-started/catalyst-organizations/) present in the [Development Environment](https://docs.catalyst.zoho.com/en/deployment-and-billing/environments/development-environment/) will be automatically mapped to **ZCQL V2 Parser**. * From **April 01st, 2025**, all the projects present in all *Orgs* that have already been mapped to **ZCQL V2 Parser** in *Development Environment* will be automatically mapped to **ZCQL V2 Parser** in the [Production Environment](https://docs.catalyst.zoho.com/en/deployment-and-billing/environments/production-environment/), if and when production is enabled for the project. * To use **ZCQL V2** in your code, you need to set the appropriate environment variable as shown in this [help document](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/zcql-console/#using-zcql-v2-in-function-code). You can refer to [Catalyst Tutorials](https://docs.catalyst.zoho.com/en/tutorials/) to get an idea of ZCQL's implementation in the function or client code of the applications. ### Benefits * Can perform data retrieval, insertion, updating, and deletion operations in the Catalyst Data Store * Similarity to MySQL ensures ease of use and there is no separate learning curve * Can test the execution of the queries in the console before implementing them in the application * Can pass a ZCQL query in an API's body using the SDKs * Can perform arithmetic and numerical operations on the result set using the ZCQL built-in functions -------------------------------------------------------------------------------- title: "General Syntax of SELECT" description: "ZCQL is Catalyst's own query language modelled after familiar query languages that you can use to query your app's database efficiently." last_updated: "2026-11-03T07:48:52.000Z" source: "https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/select/" service: "CloudScale" -------------------------------------------------------------------------------- # SELECT ### General Syntax of SELECT ZCQL supports data retrieval query operations using the `SELECT` command. This command lets you select a column or a set of columns from a base table and view the data records within the command's scope. The general syntax for a basic ZCQL data retrieval operation is as follows: ```sql SELECT {COLUMNS} FROM {BASE_TABLE_NAME} [JOIN_CLAUSE] [WHERE {WHERE_CONDITION}] [GROUP BY {GROUP_BY_COLUMN}] [ORDER BY {ORDER_BY_COLUMN}] LIMIT [{OFFSET}],{VALUE} ``` > **Note:** * The base table is the table you execute the query on. * You need not use the end-of-statement delimiter (;) at the end of a ZCQL query, while executing it in the ZCQL console. The base table is the table you execute the query on. We will discuss each ZCQL operation in detail with an example database and sample queries that you can execute on it. **Example Database:** Imagine you're developing a ticket booking application where users can view the movie listings and showtimes for various theaters in a city, and can book movie tickets using the application. Let's create a table named '**Movies**' that contains the showtime listings of the movies played in various theaters. Sample records from the _Movies_ table are given below:
| MovieID | MovieName | ShowDate | ShowTime | TheaterID |
|---|---|---|---|---|
| 2056 | The First Purge | 2018-07-13 | 13:00:00 | 047 |
| 2057 | Ant-Man and the Wasp | 2018-07-13 | 14:20:00 | 052 |
| 2058 | Hotel Transylvania 3: Summer Vacation | 2018-07-14 | 17:00:00 | 052 |
| 2059 | Skyscraper | 2018-07-14 | 21:30:00 | 053 |
| MovieID | MovieName |
|---|---|
| 2056 | The First Purge |
| 2057 | Ant-Man and the Wasp |
| 2058 | Hotel Transylvania 3: Summer Vacation |
| 2059 | Skyscraper |
| MovieID | MovieName | ShowDate | ShowTime | TheaterID |
|---|---|---|---|---|
| 2056 | The First Purge | 2018-07-13 | 13:00:00 | 047 |
| 2057 | Ant-Man and the Wasp | 2018-07-13 | 14:20:00 | 052 |
| 2058 | Hotel Transylvania 3: Summer Vacation | 2018-07-14 | 17:00:00 | 052 |
| 2059 | Skyscraper | 2018-07-14 | 21:30:00 | 053 |
| Operators | Description |
|---|---|
| = | Equal to |
| IS | TRUE if the operand is the same as the value |
| IS NULL | TRUE if the operand is a null value |
| IS NOT NULL | TRUE if the operand is not a null value |
| != | Not equal to |
| LIKE | TRUE if the operand matches a pattern |
| NOT LIKE | TRUE if the operand does not match a pattern |
| BETWEEN | TRUE if the operand value is between the start and end values |
| IN | TRUE if the operand is equal to a list of expressions |
| NOT IN | TRUE if the operand is not equal to a list of expressions |
| > | Greater than |
| >= | Greater than or equal to |
| < | Lesser than |
| <= | Lesser than or equal to |
| MovieName | ShowDate |
|---|---|
| Hotel Transylvania 3: Summer Vacation | 2018-07-14 |
| Skyscraper | 2018-07-14 |
| MovieName | ShowDate | ShowTime |
|---|---|---|
| Skyscraper | 2018-07-14 | 21:30:00 |
| MovieID | MovieName | ShowDate | ShowTime | TheaterID |
|---|---|---|---|---|
| 2059 | Skyscraper | 2018-07-17 | 21:30:00 | 053 |
| Wildcard Syntax | Definition |
|---|---|
| `\*` | Matches zero or more characters |
| `?` | Matches exactly one character |
| MovieID | MovieName | ShowDate | ShowTime | TheaterID |
|---|---|---|---|---|
| 2057 | Ant-Man and the Wasp | 2018-07-13 | 14:20:00 | 052 |
| 2058 | Hotel Transylvania 3: Summer Vacation | 2018-07-14 | 17:00:00 | 052 |
| MovieName |
|---|
| The White River Kid |
| Duplex |
| Oppenheimer |
| Name | City |
|---|---|
| Dark Knight Rises | Los Angeles |
| Titanic | New York |
| ID | Name | Department | Salary |
|---|---|---|---|
| ZT-001 | Amelia Burrows | Product Management | 15000 |
| ZT-2001 | Bruce Wayne | Sr. Management | 85000 |
| ZT-239 | Clark Kane | Media Relations | 85000 |
| ZT-4289 | Michelle Mascarenhas | Finance | 89000 |
| Zylker_Employee_DB.Salary | Zylker_Employee_DB.Name |
|---|---|
| 15000 | Amelia Burrows |
| 85000 | Bruce Wayne |
| 89000 | Michelle Mascarenhas |
| Operators | Description |
|---|---|
| = | Equal to |
| IS | TRUE if the operand is the same as the value |
| IS NULL | TRUE if the operand is a null value |
| IS NOT NULL | TRUE if the operand is not a null value |
| =! | Not equal to |
| LIKE | TRUE if the operand matches a pattern |
| NOT LIKE | TRUE if the operand does not match a pattern |
| BETWEEN | TRUE if the operand value is between the start and end values |
| IN | TRUE if the operand is equal to a list of expressions |
| NOT IN | TRUE if the operand is not equal to a list of expressions |
| > | Greater than |
| >= | Greater than or equal to |
| < | Lesser than |
| <= | Lesser than or equal to |
| ID | Name | Department | Salary |
|---|---|---|---|
| ZT-001 | Amelia Burrows | Product Management | 15000 |
| ZT-2001 | Bruce Wayne | Sr. Management | 85000 |
| ZT-239 | Clark Kane | Media Relations | 85000 |
| ZT-4289 | Michelle Mascarenhas | Finance | 89000 |
| Zylker_Employee_DB.Salary | Zylker_Employee_DB.Department | Zylker_Employee_DB.Name |
|---|---|---|
| 85000 | Sr. Management | Bruce Wayne |
| 89000 | Finance | Michelle Mascarenhas |
| TheaterID | TheaterName | Location |
|---|---|---|
| 047 | The Express Cinemas | New York City |
| 048 | ANC Cinemas | Rochester |
| 052 | Cosmos Theater | Albany |
| 053 | FunTime Cinemas | Buffalo |
| MovieName | TheaterName | ShowDate | ShowTime |
|---|---|---|---|
| Ant-Man and the Wasp | The Express Cinemas | 2018-07-13 | 13:30:00 |
| Hotel Transylvania 3: Summer Vacation | Cosmos Theater | 2018-07-13 | 14:20:00 |
| The First Purge | Cosmos Theater | 2018-07-14 | 17:00:00 |
| The First Purge | FunTime Cinemas | 2018-07-14 | 21:30:00 |
| TheaterName | Location | MovieName |
|---|---|---|
| The Express Cinemas | New York City | The First Purge |
| ANC Cinemas | Rochester | NULL |
| Cosmos Theater | Albany | Hotel Transylvania 3: Summer Vacation |
| FunTime Cinemas | Buffalo | Skyscraper |
| TheaterID | MovieID | Price |
|---|---|---|
| 047 | 2056 | 9.20 |
| 048 | NULL | NULL |
| 052 | 2057 | 8.64 |
| 052 | 2058 | 11.50 |
| 053 | 2059 | 7.44 |
| TheaterName | MovieName | ShowDate | ShowTime | Price |
|---|---|---|---|---|
| The Express Cinemas | The First Purge | 2018-07-13 | 13:00:00 | 9.20 |
| ANC Cinemas | NULL | NULL | NULL | NULL |
| Cosmos Theater | Ant-Man and the Wasp | 2018-07-13 | 14:20:00 | 8.64 |
| Cosmos Theater | Hotel Transylvania 3: Summer Vacation | 2018-07-14 | 17:00:00 | 11.50 |
| FunTime Cinemas | Skyscraper | 2018-07-14 | 21:30:00 | 7.44 |
| TheaterName | Location |
|---|---|
| Cosmos Theater | Albany |
| FunTime Cinemas | Buffalo |
| The Express Cinemas | New York City |
| ANC Cinemas | Rochester |
| Names |
|---|
| AMELIA BURROWS |
| amelia burrows |
| amelia Burrows |
| Amelia Burrows |
| Zylker_EMP.Names |
|---|
| AMELIA BURROWS |
| amelia burrows |
| amelia Burrows |
| Amelia Burrows |
| MovieName | Price |
|---|---|
| Hotel Transylvania 3: Summer Vacation | 11.50 |
| The First Purge | 9.20 |
| Ant-Man and the Wasp | 8.64 |
| Skyscraper | 7.44 |
| MovieID | MovieName | ShowDate | ShowTime | TheaterID |
|---|---|---|---|---|
| 2057 | Ant-Man and the Wasp | 2018-07-13 | 14:20:00 | 052 |
| 2058 | Hotel Transylvania 3: Summer Vacation | 2018-07-14 | 17:00:00 | 052 |
| 2059 | Skyscraper | 2018-07-14 | 21:30:00 | 053 |
| MIN(Price) |
|---|
| 7.44 |
| MAX(Price) |
|---|
| 11.50 |
| COUNT(TheaterName) |
|---|
| 2 |
| SUM(Price) |
|---|
| 20.7 |
| AVG(Price) |
|---|
| 9.19 |
| TheaterName |
|---|
| The Express Cinemas |
| Cosmos Theater |
| FunTime Cinemas |
| ID | Name | Department | Salary |
|---|---|---|---|
| ZT-001 | Amelia Burrows | Product Management | 15000 |
| ZT-2001 | Bruce Wayne | Sr. Management | 85000 |
| ZT-239 | Clark Kane | Media Relations | 4500 |
| ZT-4289 | Michelle Mascarenhas | Finance | 89000 |
| MAX(Salary) | SUM(Salary) | MIN(Salary) | AVG(Salary) | COUNT(Salary) |
|---|---|---|---|---|
| 89000 | 193500 | 4500 | 48975 | 4 |
| Name | Salary | Reimbursement |
|---|---|---|
| Michelle Mascarenhas | 90000 | 10000 |
| Bruce Kyle | 3000000 | 45000 |
| Clark Kane | 3300 | 1500 |
| Judith Bridges | 4700 | 300 |
| Devon Dreymond | 80000 | 2300 |
| Ashley Kim | 6000 | 200 |
| ZylkerEmployeeCompensation.Salary | ZylkerEmployeeCompensation.Reimbursement |
|---|---|
| 3300 | 45000 |
| 4700 | 10000 |
| 6000 | 2300 |
| 80000 | 1500 |
| 90000 | 300 |
| 3000000 | 200 |
| Name | Salary | Reimbursement |
|---|---|---|
| Michelle Mascarenhas | 90000 | 10000 |
| Bruce Kyle | 3000000 | 45000 |
| Clark Kane | 3300 | 1500 |
| Judith Bridges | 4700 | 300 |
| Devon Dreymond | 80000 | 2300 |
| Ashley Kim | 6000 | 200 |
| Manager | Member |
|---|---|
| Michelle Mascarenhas | Bruce Kyle |
| Michelle Mascarenhas | Clark Kane |
| Judith Bridges | Michelle Mascarenhas |
| Manager.Name | Member.Name |
|---|---|
| Michelle Mascarenhas | Bruce Kyle |
| Michelle Mascarenhas | Clark Kane |
| Judith Bridges | Michelle Mascarenhas |
| Datatype | Case | Sample ZCQL Query | Triggered Exception |
|---|---|---|---|
| Encrypted Text | Certain operators are not supported | SELECT * FROM temp WHERE enc > 'temsp' | `Operator > is not supported for ENCRYPTED TEXT` The same exception applies, but the exception message will be altered accordingly if you use these operators **<**, **<=**, **>=** in the ZCQL statement |
| `LIKE` is not supported | SELECT * FROM temp WHERE enc LIKE '*temsp' | `Operator LIKE is not supported for ENCRYPTED TEXT` The same exception applies, but the exception message will be altered accordingly if you use **NOT LIKE** in the ZCQL statement | |
| `BETWEEN` is not supported | SELECT * FROM temp WHERE enc BETWEEN 'one' AND 'ten' | `Operator BETWEEN is not supported for ENCRYPTED TEXT` The same exception applies, but the exception message will be altered accordingly if you use **NOT BETWEEN** in the ZCQL statement | |
| `IN` is not supported | SELECT * FROM temp WHERE enc IN ('one','three') | `Operator IN is not supported for ENCRYPTED TEXT` The same exception applies if you use **NOT IN** in your query, but the exception message will be altered accordingly | |
| ZCQL functions is not supported | SELECT AVG(enc) FROM temp | `AVG() function is not supported for ENCRYPTED_TEXT` [ZCQL Functions](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/zcql-functions/) are not supported in **Encrypted Text**. | |
| Boolean | Certain operators are not supported | SELECT * FROM temp WHERE bools > FALSE | `Operator > is not supported for BOOLEAN` The same exception applies, but the exception message will be altered accordingly if you use these operators **<**, **<=**, **>=** in the ZCQL statement |
| `LIKE` is not supported | SELECT * FROM temp WHERE bools LIKE FALSE | `Operator LIKE is not supported for BOOLEAN` The same exception applies if you use **NOT LIKE** in your query, but the exception message will be altered accordingly | |
| `BETWEEN` is not supported | SELECT * FROM temp WHERE bools BETWEEN TRUE and FALSE | `Operator BETWEEN is not supported for BOOLEAN` The same exception applies if you use **NOT BETWEEN** in your query, but the exception message will be altered accordingly | |
| `IN` is not supported | SELECT * FROM temp WHERE bools IN (TRUE, FALSE) | `Operator IN is not supported for BOOLEAN` The same exception applies if you use **NOT IN** in your query, but the exception message will be altered accordingly | |
| VarChar | Maximum length exceeded | INSERT INTO temp (Fishes) value ('salmon') | `'salmon' data too long for column 'Fishes'` The column `Fishes` was created as a **VarChar** and the **MaxLength** was set as `5`. In this statement, `'Salmon'` exceeds the **MaxLength** |
| Integer | Maximum value exceeded | INSERT INTO temp (numbers) VALUE (546895326908) | `For column 'ints' INT value should be between -9999999999 and 9999999999` The column numbers was created as **INT**. The value of **INT** datatype should be between `-9999999999` and `9999999999` |
| Big Integer | Maximum value exceeded | INSERT INTO temp (numbers) VALUE (92343432412351 435123453245) | `Given numeric value 92343432412351 435123453 is too large` The column numbers was created as **BIGINT**. The value of **BIGINT** datatype should be between `-9223372036854775808` and `9223372036854775807` |
| Text | Value not enclosed in single quotes | SELECT * FROM temp WHERE name = one | `Unknown Table temp or Unknown Column one in WHERE` The value `one` will be considered as column if it is not enclosed in quotes-'`one`' |
| Parameter Name | Data Type | Definition |
|---|---|---|
| `query` | String | A **Mandatory** parameter. Will store the query to be executed. |