随笔分类 -  sql

sql 常用建表语句
摘要:CREATE TABLE `t_platform_push_user` ( `oid` varchar(32) NOT NULL, `userId` varchar(32) DEFAULT NULL COMMENT '用户ID', `mobileBrand` varchar(32) DEFAULT 阅读全文

posted @ 2018-03-01 09:38 跳刀玛利亚 阅读(229) 评论(0) 推荐(0)

mysql 變量 的使用
摘要:select t1.base_Oid t1base_oid ,sum(t1.TwoGeneration_tgroup_commission_amount) TwoGeneration_tgroup_commission_amount from (select base.oid base_Oid ,b 阅读全文

posted @ 2017-12-28 11:31 跳刀玛利亚 阅读(133) 评论(0) 推荐(0)

case when then end
摘要:select tmp.kaquanbiaoti '卡券标题',tmp.userPhone '注册手机号' ,baseaccount.realName '姓名' ,tmp.jine '金额', CASE tmp.lingyongzhuangtai when 'notUsed' then '未使用' w 阅读全文

posted @ 2017-12-28 11:29 跳刀玛利亚 阅读(113) 评论(0) 推荐(0)

join
摘要:logon 图解SQL的inner join、left join、right join、full outer join、union、union all的区别 对于SQL的Join,在学习起来可能是比较乱的。我们知道,SQL的Join语法有很多inner的,有outer的,有left的,有时候,对于S 阅读全文

posted @ 2017-10-10 08:39 跳刀玛利亚 阅读(238) 评论(0) 推荐(1)

导航