简体   繁体   English

如何正确格式化“从schema.table_name选择前1000 *”以在Toad 4 Apache Hadoop中工作?

[英]How can I correctly format “select top 1000 * from schema.table_name;” to work in Toad 4 Apache Hadoop?

Trying to run this in Toad 4 Apache Hadoop (Hive), and it does not recognize the top function. 试图在Toad 4 Apache Hadoop(Hive)中运行它,但它无法识别最重要的功能。 How can I reformat this? 我该如何重新格式化?

select top 1000 * from Finance.ACCT_LIST

You can use LIMIT : 您可以使用LIMIT

select * from Finance.ACCT_LIST
order by somecolumn
limit 1000

You should add an order by clause if you want to get a consistent set of rows. 如果要获得一致的行集,则应添加order by子句。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我怎么能... SELECT *,lcase(name)AS名称FROM表 - How can I… SELECT *, lcase(name) AS name FROM table 列在书面“Select *”查询中显示 null,但填充在“Select top 1000”中。 我该如何解决这个问题? - Column shows null in written “Select *” query, but is populated in “Select top 1000”. How can I resolve this issue? 如何从table1中选择前500行并将它们INSERT到table2? - How can I SELECT top 500 rows from table1 and INSERT them to table2? 如何在 PL SQL 中使用表名而不是 SCHEMA - How can I use table name instead of SCHEMA in PL SQL SQL:如何使用信息架构中的Table_Name和Pivoted Column_Name构建选择查询 - SQL: How to build a select query with Table_Name and Pivoted Column_Name from Information Schema 选择前1000名,但知道有多少行? - select top 1000, but know how many rows are there? 在MariaDB中如何从表中选择前10行? - In MariaDB how do I select the top 10 rows from a table? 无法从PostgreSQL的information_schema.tables中选择table_name - Can not select table_name from information_schema.tables in PostgreSQL 我使用合并后是否需要删除表? 在合并的表i上运行select top 1000查询时出错 - Do i need to drop table after i use merge? Error when running the select top 1000 query on table i merged Select object 的名称在另一个表中的表中的最高平均值 - Select top average from a table where the name of the object is in another table
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM