Hi Mainak, For select queries the only way I know of for multiple records is through using union:
0: jdbc:hive2://localhost:10000> with x as (select 1 num union select 2 union select 3) select * from x; +--------+ | x.num | +--------+ | 1 | | 2 | | 3 | +--------+ For table insertion you can use a syntax somewhat similar to VALUES https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingvaluesintotablesfromSQL Kind Regards, David On Wed, Mar 27, 2019 at 12:40 AM Mainak Ghosh <mgh...@twitter.com> wrote: > Hello, > > We want to create temp tables at a select query level. For example: > > with x as (1, 2, 3) select * from x; > > Or > > Select * from table where id in <list of integers>; Here list of integers > is an input and can change. > > Currently Postgres VALUES syntax is not supported in Hive. Is there some > easy workarounds which does not involved explicitly creating temporary > tables and can be specified at the select query level? > > Thanks and Regards, > Mainak -- *David Lavati* | Software Engineer t. (+3620) 951-7468 <0036209517468> cloudera.com <https://www.cloudera.com> [image: Cloudera] <https://www.cloudera.com/> [image: Cloudera on Twitter] <https://twitter.com/cloudera> [image: Cloudera on Facebook] <https://www.facebook.com/cloudera> [image: Cloudera on LinkedIn] <https://www.linkedin.com/company/cloudera> ------------------------------