Thursday 11 August 2022

HIVE: limit number of results

Syntax

select * from {table_name} limit {no_of_records_to_return}

Example

select * from employee limit 2;

hive> select * from employee limit 2;
OK
1   Hari    ["Football","Cricket"]  {"Java":"3.4Yrs","C":"4.5Yrs"}  {"gender":"Male","age":30}
2   Chamu   ["Trekking","Watching movies"]  {"Selenium":"5.6Yrs"}   {"gender":"Feale","age":38}
Time taken: 0.152 seconds, Fetched: 2 row(s)



Previous                                                    Next                                                    Home

No comments:

Post a Comment