<bdo id='hqT65'></bdo><ul id='hqT65'></ul>

    1. <tfoot id='hqT65'></tfoot>
      <legend id='hqT65'><style id='hqT65'><dir id='hqT65'><q id='hqT65'></q></dir></style></legend>
    2. <small id='hqT65'></small><noframes id='hqT65'>

    3. <i id='hqT65'><tr id='hqT65'><dt id='hqT65'><q id='hqT65'><span id='hqT65'><b id='hqT65'><form id='hqT65'><ins id='hqT65'></ins><ul id='hqT65'></ul><sub id='hqT65'></sub></form><legend id='hqT65'></legend><bdo id='hqT65'><pre id='hqT65'><center id='hqT65'></center></pre></bdo></b><th id='hqT65'></th></span></q></dt></tr></i><div id='hqT65'><tfoot id='hqT65'></tfoot><dl id='hqT65'><fieldset id='hqT65'></fieldset></dl></div>

      如何将数据插入到 Hive(0.13.1) 表中?

      时间:2024-04-15

    4. <legend id='oaZY7'><style id='oaZY7'><dir id='oaZY7'><q id='oaZY7'></q></dir></style></legend>
      <tfoot id='oaZY7'></tfoot>
            <tbody id='oaZY7'></tbody>

          <small id='oaZY7'></small><noframes id='oaZY7'>

          1. <i id='oaZY7'><tr id='oaZY7'><dt id='oaZY7'><q id='oaZY7'><span id='oaZY7'><b id='oaZY7'><form id='oaZY7'><ins id='oaZY7'></ins><ul id='oaZY7'></ul><sub id='oaZY7'></sub></form><legend id='oaZY7'></legend><bdo id='oaZY7'><pre id='oaZY7'><center id='oaZY7'></center></pre></bdo></b><th id='oaZY7'></th></span></q></dt></tr></i><div id='oaZY7'><tfoot id='oaZY7'></tfoot><dl id='oaZY7'><fieldset id='oaZY7'></fieldset></dl></div>

                <bdo id='oaZY7'></bdo><ul id='oaZY7'></ul>
                本文介绍了如何将数据插入到 Hive(0.13.1) 表中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我使用的是 Hive 版本 0.13.1.尝试将数据插入现有表时,在使用以下查询时出错:

                I am using Hive version 0.13.1. While trying to insert data into an existing table getting an error while using the below query:

                CREATE TABLE table1 (order_num int, payment_type varchar(20), category varchar(20));
                INSERT INTO TABLE table1 VALUES (151, 'cash', 'lunch');
                

                错误:

                ParseException line 1:25 无法识别 'VALUES' 附近的输入'('选择子句中的151"

                ParseException line 1:25 cannot recognize input near 'VALUES' '(' '151' in select clause

                在搜索时,让每个人都建议上述查询,但不幸的是它对我不起作用.是不是因为 Hive 版本不同?
                由于链接here
                需要帮助将数据插入到 Hive 中的现有表中.

                While searching, got everyone suggesting above query, but unfortunately it's not working for me. Is it due to different Hive version?
                I am getting this ambiguity due to link here
                Needs help to insert data to an existing table in Hive.

                推荐答案

                Hive 直到 .14 版本才提供插入值语句,因此您需要更改语法以执行插入选择语句.

                An insert values statement isn't available in Hive until version .14, so you will need to change your syntax to do a insert select statement.

                INSERT INTO TABLE table1 SELECT 151, 'cash', 'lunch';
                

                如果你想插入多个值,那么你可以联合选择

                If you want to insert multiple values then you can union selects

                INSERT INTO TABLE table1 
                    SELECT 151, 'cash', 'lunch'
                    union all
                    SELECT 152, 'money', 'dinner';
                

                这篇关于如何将数据插入到 Hive(0.13.1) 表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:SQL 挑战/谜题:给定堆栈跟踪 - 如何在每个时间点找到顶部元素? 下一篇:将 BLOB(图像)从 oracle 导入到 hive

                相关文章

                  <i id='uPBq2'><tr id='uPBq2'><dt id='uPBq2'><q id='uPBq2'><span id='uPBq2'><b id='uPBq2'><form id='uPBq2'><ins id='uPBq2'></ins><ul id='uPBq2'></ul><sub id='uPBq2'></sub></form><legend id='uPBq2'></legend><bdo id='uPBq2'><pre id='uPBq2'><center id='uPBq2'></center></pre></bdo></b><th id='uPBq2'></th></span></q></dt></tr></i><div id='uPBq2'><tfoot id='uPBq2'></tfoot><dl id='uPBq2'><fieldset id='uPBq2'></fieldset></dl></div>

                      <bdo id='uPBq2'></bdo><ul id='uPBq2'></ul>
                    <tfoot id='uPBq2'></tfoot>

                    <small id='uPBq2'></small><noframes id='uPBq2'>

                    <legend id='uPBq2'><style id='uPBq2'><dir id='uPBq2'><q id='uPBq2'></q></dir></style></legend>