
MySQL
lingaixuexi
这个作者很懒,什么都没留下…
展开
-
MySQL基础查询子句 where /order by/通配符过滤 like/正则表达式过滤 regexp
##第4章 检索数据#检索单个列、多个列、所有列select prod_name from products;select prod_id,prod_name,prod_price from products;select * from products;#检索不同的行(唯一行)select vend_id from products;select distinct vend_id...原创 2019-01-04 21:59:15 · 1150 阅读 · 0 评论 -
MySQL基础:拼接字段concat、文本处理函数、时间日期处理函数、聚合函数count()、avg()、max()、min()、sum()、分组计算group by
##第10章 创建计算字段#拼接字段(concat)select concat(vend_name,' (',vend_country,')') from vendors order by vend_name;select concat(RTrim(vend_name),' (',RTrim(vend_country),')') from vendors order by vend_name...原创 2019-01-05 20:21:41 · 1850 阅读 · 2 评论 -
MySQL基础:子查询、内部联结inner join、左外联结left outer join、右外联结right outer join、合并查询union与union all、全文本搜索
第14章 子查询#列出订购物品TNT2的所有客户的姓名、联系人1、在orderitems表中由prod_id查找order_numselect order_num from orderitems where prod_id='TNT2'2、在orders表中由order_num查找cust_idselect cust_id from orders where order_num in ...原创 2019-01-12 15:24:56 · 523 阅读 · 0 评论 -
coalesce函数
coalesce函数在Maxcompute里面的官方解释如下:具体怎么用呢?上面的函数说明通俗来说coalesce()的作用是:返回传入的参数中第一个非null的值。expre1不为空值则返回expre1;否则判断expre2是否是空值,如果expre2不为空值则返回expre2;否则判断expre3是否是空值,如果expre3不为空值则返回expre3;……以此类推,如果所有的表达式...原创 2019-06-24 15:07:24 · 87748 阅读 · 0 评论