hivesql,sql 函数总结:

1、NVL函数与Coalesce差异

-- select nvl(null,8); -- 结果是 8

-- select nvl('',7); -- 结果是""

-- select coalesce(null,null,9); -- 结果是 9

-- select coalesce("",null,9); -- 结果是 ""

1.2、

NVL函数与Coalesce差异 - 知乎Oracle中函数以前介绍的字符串处理,日期函数,数学函数,以及转换函数等等,还有一类函数是通用函数。主要有:NVL,NVL2,NULLIF,COALESCE,这几个函数用在各个类型上都可以。 下面简单介绍一下几个函数的用法。 在...https://zhuanlan.zhihu.com/p/474789591

1.3、NVL和COALESCE的区别_coalesce函数-CSDN博客文章浏览阅读3.7k次,点赞5次,收藏27次。nvl:支持两个参数。其本质是个函数。coalesce:如果第一个参数为空就取第二个参数的值,第二个参数可以为常数也可以为表达式(字段,语句等)。以此类推,支持多个参数。更常用,其本质是个语句,更像个if语句,效率更高,建议使用。_coalesce函数https://blog.csdn.net/Allenzyg/article/details/128032686

2、hive 库、表、数据的增删改查语法

hive 库、表、数据的增删改查语法_hive修改数据_BigData_mie的博客-CSDN博客文章浏览阅读407次。【代码】hive 库、表、数据的增删改查语法。_hive修改数据https://blog.csdn.net/BigData_mie/article/details/129101216

3、insert into 与 insert overwrite 在hivesql中的用法

python 复制代码
-- create table test_kuming_202311041520.students 
-- ( id bigint, name string);

-- select *  from  test_kuming_202311041520.students;

-- drop  table test_kuming_202311041520.students;

-- insert into test_kuming_202311041520.students (id,name) values(1,"yyyy")

---- insert  into 加不加表名,都可以。
-- insert into test_kuming_202311041520.students (id,name) values(12,"wwww")

-- insert into  table test_kuming_202311041520.students (id,name) values(52,"9999")  

---- overwrite 的错误用法
-- insert overwrite  table test_kuming_202311041520.students (id,name) values(52,"9999")  --  这样操作是错误的;

-- overwrite 的正确用法
-- insert overwrite  table  test_kuming_202311041520.students
-- select * from test_kuming_202311041520.students  where id = '1'

4、

5、

6、

7、

相关推荐
yjb.gz2 分钟前
Oracle函数JSON_TABLE使用
数据库·oracle·json
Dubhehug36 分钟前
4.B树和B+树的区别?为什么MySQL选择B+树作为索引?
数据库·b树·mysql·面试·b+树
linux修理工1 小时前
n1 armbian 安装桌面环境并启用xrdp远程登录
linux·服务器·数据库
开开心心就好3 小时前
高效报价软件,简化商铺定价流程
服务器·数据库·安全·面试·职场和发展·电脑·symfony
钢铁男儿4 小时前
PyQt5高级界而控件(容器:装载更多的控件QDockWidget)
数据库·python·qt
罗光记4 小时前
PHP诞生30周年
前端·数据库·百度·facebook·twitter
阿蒙Amon7 小时前
C# Linq to SQL:数据库编程的解决方案
数据库·c#·linq
互联网搬砖老肖10 小时前
运维打铁: MongoDB 数据库集群搭建与管理
运维·数据库·mongodb
典学长编程11 小时前
数据库Oracle从入门到精通!第四天(并发、锁、视图)
数据库·oracle
积跬步,慕至千里12 小时前
clickhouse数据库表和doris数据库表迁移starrocks数据库时建表注意事项总结
数据库·clickhouse