Impala Limit Clause - Apache Impala

What isImpala Limit Clause?

The limit clause in Impala is used to restrict the number of rows of a resultset to a desired number, i.e., the resultset of the query does not hold the records beyond the specified limit.


Following is the syntax of the Limit clause in Impala.


Assume we have a table named customers in the database my_db and its contents are as follows −

You can arrange the records in the table in the ascending order of their id’s using the order by clause as shown below.

Now, using the limit clause, you can restrict the number of records of the output to 4, using the limit clause as shown below.

On executing, the above query gives the following output.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Apache Impala Topics