随笔分类 -  sql语句

sql语句
摘要:1.按字段是否空分组,mysql数据库 SELECT SUM(t.PROJECT_UNIT_COUNT) AS PROJECT_UNIT_COUNT,COUNT(*) AS PROJECT_COUNTFROM QS_PROJECT t GROUP BY ISNULL(t.`xx`) 2.根据出生日期 阅读全文

posted @ 2016-08-12 11:55 泽口靖子 阅读(143) 评论(0) 推荐(0)

sql语句--查询语句(MySQL)
摘要:1.截取字符串 left(str, length),right(str, length),substring(str, pos, length) 原文:http://www.jb51.net/article/27458.htm 2.显示查询结果的前100条 select * from tbl lim 阅读全文

posted @ 2015-12-26 20:39 泽口靖子 阅读(165) 评论(0) 推荐(0)

sql语句-排序后加入序号再运算判断取想要的项
摘要:select a.id as aid,b.id as bid,a.city,a.cang,a.sid,a.time as atime,b.time as btime,a.price as aprice,b.price as bprice,a.pm as apm,b.pm as bpm from (s 阅读全文

posted @ 2015-12-07 11:26 泽口靖子 阅读(573) 评论(0) 推荐(0)

导航