Select top N records in SQL / Hive

visibility 12,139 comment 0 access_time 3y languageEnglish

In different databases, the syntax of selecting top N records are slightly different. They may also differ from ISO standards.

In Hive, use LIMIT N retrieve N records from the table. Remember to change N to an actual number.

Code snippet

SELECT * FROM TableName LIMIT N;
info Last modified by Raymond 3y copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Tags
More from Kontext
Apache Hive 3.1.2 Installation on Linux Guide
visibility 4,159
thumb_up 3
access_time 12m
visibility 321
thumb_up 0
access_time 2y