Select top N records in SQL / Hive
insights Stats
warning Please login first to view stats information.
Raymond
Code Snippets & Tips
Code snippets and tips for various programming languages/frameworks. All code examples are under MIT or Apache 2.0 license unless specified otherwise.
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 6 years ago
copyright
This page is subject to Site terms.
comment Comments
No comments yet.