如何正确格式化“selecttop1000*fromschema.table\u name;”在toad4apachehadoop中工作?

50few1ms  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(347)

试图在toad4apachehadoop(hive)中运行它,但它无法识别top函数。如何重新格式化?

  1. select top 1000 * from Finance.ACCT_LIST
idfiyjo8

idfiyjo81#

你可以用 LIMIT :

  1. select * from Finance.ACCT_LIST
  2. order by somecolumn
  3. limit 1000

你应该加一个 order by 子句来获取一致的行集。

相关问题