In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the difference between Hive-sql and sql. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
Differences: 1, Hive-sql does not support equivalent connections, but sql supports; 2, Hive-sql does not support "Insert into table Values ()", UPDATA, DELETE operations, but sql supports; 3, Hive-sql does not support transactions, but sql supports.
Generally speaking, hiveSQL is basically the same as SQL, and it was originally designed to enable people who can SQL but do not program MapReduce to use Hadoop for data processing.
1. Hive does not support equivalent connection.
Equivalent connections are not supported and are generally replaced by left join, right join, or inner join.
For example:
Internal associations in SQL can be written as follows: select * from a, b where a.key = b.key
This should be written in Hive: select * from a join b on a.key = b.key
You cannot use the method of omitting join in hive.
2. Semicolon character
The semicolon is the closing symbol of the sql statement, as well as in hive, but hive is not so intelligent in recognizing the semicolon and sometimes needs to escape.
3 、 NULL
In sql, null represents a null value, but in Hive, if a field of type String is an empty (empty) string, that is, the length is 0, then the result of is null judgment is False.
4. Hive does not support inserting data into existing tables or partitions
Hive only supports overwriting and rewriting the entire table.
Insert overwrite table (overwrite override)
5. Hive does not support Insert into table Values (), UPDATA, DELETE operations.
Insert into is to append data to a table or partition.
6. Hive supports embedding mapreduce programs to handle complex logic.
There are no examples to provide for the time being.
7. Hive supports writing converted data directly to different tables, as well as to partitions, hdfs and local directories.
Avoid the overhead of scanning the input table multiple times.
8. HQL does not support row-level additions, modifications, and deletions. All data is determined at the time of loading and cannot be changed.
Thank you for reading! About the difference between Hive-sql and sql to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.