--- title: "General Syntax of SELECT" url: https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/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-08-28T06:26:16Z service: Cloud Scale type: general --- # 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
### Basic SELECT The `SELECT` statement is used to select the columns from a base table and display its records. You should mention the names of the columns that are to be displayed in the result set. The syntax for using a basic `SELECT` statement is: ```sql SELECT column_name(s) FROM base_table_name ``` **Example**: To select the _MovieID_ and _MovieName_ columns from the _Movies_ table, execute the following query: ```sql SELECT MovieID, MovieName from Movies ``` It will generate the following output:
MovieID MovieName
2056 The First Purge
2057 Ant-Man and the Wasp
2058 Hotel Transylvania 3: Summer Vacation
2059 Skyscraper
For columns that have been named using integers, you need to add the backtick **`** punctuation to differentiate between column name and value. For example, a `SELECT` query on a table called *Numbers* with a column named *01* can be written in the following manner ```sql SELECT `01` FROM Numbers ``` > **Note:** You can fetch a maximum of 20 columns and a maximum of 300 rows in one `SELECT` query. If you require more records to be fetched, you can use the [LIMIT clause](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/limit/) to iterate the query and specify the offset and value accordingly. ### SELECT \* You can fetch records from all the columns of a base table, instead of selecting records from a particular column or columns, by using a '\*' following the `SELECT` statement. The '\*' denotes all the columns of the base table. The syntax for selecting all the columns from a base table is: ```sql SELECT * FROM base_table_name ``` > **Note:** `SELECT \*` allows you to fetch a maximum of 300 rows in one query. If you require more records to be fetched, you can use the [LIMIT clause](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/limit/) to iterate the query and specify the offset and value accordingly. **Example**: To display the records from all the columns of the _Movies_ table, execute the following query: ```sql SELECT * FROM Movies ``` This will display records from all the columns in the _Movies_ table.
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
Before we discuss the various clauses and statements available for the `SELECT` operation, let's discuss the `INSERT`, `UPDATE`, and `DELETE` operations.