![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
北京道落不了雪
向前走,不回头
展开
-
COALESCE()函数
COALESCE()函数主流数据库系统都支持COALESCE()函数,这个函数主要用来进行空值处理,其参数格式如下:COALESCE ( expression,value1,value2……,valuen)COALESCE()函数的第一个参数expression为待检测的表达式,而其后的参数个数不定。COALESCE()函数将会返回包括expression在内的所有参数中的第一个非空表达式。select * from SomeTable where IsNull(SomeNullableBi..原创 2021-02-01 15:45:18 · 399 阅读 · 0 评论 -
查询mysql数据库中所有表名,修改表名
select table_name from information_schema.tables where table_schema='table_name';alter table table_old_name rename AS table_new_name;原创 2019-10-18 12:54:03 · 343 阅读 · 0 评论 -
多表更新语句
UPDATE org_personnel_duty tcINNER JOIN(select op.id id,op.per_name,op.host_post host_post,opd.org_dept_duty_id,opd.id idsfrom org_personnel_duty opdLEFT JOIN org_personnel op on op.id = opd.org_per...原创 2019-07-09 09:13:04 · 272 阅读 · 0 评论