--- title: "Execute ZCQL queries" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/zcql/execute-zcql-query/ description: "This page describes the method to execute ZCQL queries on a table in the Data Store in your Java application with sample code snippets." last_updated: 2026-02-16T15:02:46Z service: Cloud Scale type: general related_links: - name: "Execute ZCQL queries - API" url: /en/api/code-reference/cloud-scale/zcql/execute-zcql-query/#ExecuteZCQLQuery - name: "Execute ZCQL queries" url: /en/cloud-scale/help/zcql/introduction - name: "Data Store" url: /en/cloud-scale/help/data-store/introduction --- # ZCQL [ZCQL](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/introduction) is Catalyst's own query language that enables you to perform data retrieval, insertion, updating, and deletion operations on the tables in the [Catalyst Data Store](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/introduction). You can execute a variety of DML queries using ZCQL to obtain or manipulate data, and use various clauses and statements such as the SQL Join clauses, Groupby and OrderBy statements, and built-in SQL functions. ### Execute ZCQL Queries Catalyst also provides an [**OLAP database**](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/olap-database/introduction/), in addition to the primary Data Store that is suited for analytical data retrieval queries. You can choose to execute simple transactional queries on the primary Data Store, and complex analytical queries that involve [ZCQL functions](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/zcql-functions/) on the OLAP database. The queries that you execute on the primary Data Store can include SELECT, INSERT, UPDATE, or DELETE statements. The queries that you execute on the OLAP database must only include the SELECT statement, as direct write operations on it are not allowed. You must construct a ZCQL query and pass it to the `executeQuery()` method for execution as shown in the sample code below. The `executeQuery()` method supports these three parameters: * The String variable containing the constructed query statement * `isV2?`: A boolean value (`true` or `false`) indicating if it is a ZCQL v2 query * `isOLAP?`: A boolean value (`true` or `false`) indicating if the query needs to be executed on the OLAP database ```sql executeQuery(query: string, isV2?: boolean , isOLAP?:boolean) ``` A sample SELECT query is shown below. The response will contain the records you fetch using the SELECT query, or the response generated for the other operations. #### Sample Code Snippet **Package Imports** ```java import com.zc.component.object.ZCRowObject; import com.zc.component.zcql.ZCQL; ``` ```java //Construct the query to be executed String query = "SELECT * from empDetails limit 10"; //Get the ZCQL instance and execute query using the query string ArrayList rowList = ZCQL.getInstance().executeQuery(query, true , false) ```