--- title: "Execute ZCQL Query" url: https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/zcql/execute-zcql-query/ description: "ZCQL is Catalyst's own query language that enables you to perform data retrieval operations in the Data Store." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Data Store" url: /en/cloud-scale/help/data-store/introduction - name: "ZCQL" url: /en/cloud-scale/help/zcql/introduction/ - name: "Execute ZCQL - API" url: /en/api/code-reference/cloud-scale/zcql/execute-zcql-query/#ExecuteZCQLQuery --- # Execute ZCQL Query > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/query-datastore/) now. ### Construct the Query You must construct a [ZCQL query](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/introduction/) on the required data set before you execute it. A sample SELECT query is shown below: ```javascript //Create a query to execute var query = 'SELECT * FROM ShipmentData'; ``` ### Execute the Query The query object created in the step above is passed to the executeZCQLQuery() method. The zcql reference used here is the [component instance](https://docs.catalyst.zoho.com/en/sdk/web/v4/cloud-scale/zcql/get-component-instance) defined earlier. This will return a promise which will be resolved to an object. The content key will contain the array of row objects. ```javascript //Execute the query by passing it var zcql = catalyst.ZCatalystQL; var zcqlPromise = zcql.executeQuery(query); zcqlPromise .then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); }); ``` > **Note:** To use [ZCQL V2](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/syntax-exceptions/) commands in your code, use the Catalyst methods listed [here](https://docs.catalyst.zoho.com/en/sdk/web/v4/overview/#manage-environment-variables) with the values listed below to set the appropriate environment variable: * **Key**: `ZOHO_CATALYST_ZCQL_PARSER` * **Value**: `V2` A sample response that you will receive is shown below. The response is the same for both versions of Web SDK. **Web SDK** ```json [ { AlienCity: { CREATORID: "2136000000006003", MODIFIEDTIME: "2021-08-13 13:49:19:475", CREATEDTIME: "2021-08-13 13:49:19:475", CityName: "Dallas", ROWID: "2136000000008508" } }, { AlienCity: { CREATORID: "2136000000006003", MODIFIEDTIME: "2021-08-16 15:55:32:969", CREATEDTIME: "2021-08-16 15:55:32:969", CityName: "Houston", ROWID: "2136000000011002" } }, { AlienCity: { CREATORID: "2136000000006003", MODIFIEDTIME: "2021-08-16 17:03:01:507", CREATEDTIME: "2021-08-16 16:29:10:499", CityName: "Austin", ROWID: "2136000000011011" } } ] ```