mount

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  【Mysql】

摘要:select sum(guid) from `sqm`.`sqm_value_quality_station` WHERE result='PASS'GROUP BY station_codesqmdcselect count(guid),station_code from `sqm`.`sqm_value_quality_station` WHERE result='PASS'GROUP BY dayselect count(guid), station_code from `sqm`.`sqm_value_quality_station` WHERE res 阅读全文
posted @ 2011-11-22 09:07 http://guoyinfeng.info/ 阅读(183) 评论(0) 推荐(0)

摘要:SELECT count(guid),type FROM `sqm`.`sqm_alarm` group by type 阅读全文
posted @ 2011-11-22 09:05 http://guoyinfeng.info/ 阅读(157) 评论(0) 推荐(0)

摘要:select val1.serial_no beanKey, val1.fail beanValNeed,val2.total beanValTotalfrom(select count(guid) fail ,serial_nofrom `sqm`.`sqm_value_quality_station` WHERE result='1'GROUP BY serial_no) val1left join (select count(guid) total,serial_nofrom `sqm`.`sqm_value_quality_station` GROUP BY seria 阅读全文
posted @ 2011-11-22 09:04 http://guoyinfeng.info/ 阅读(125) 评论(0) 推荐(0)

摘要: 阅读全文
posted @ 2011-11-21 10:12 http://guoyinfeng.info/ 阅读(136) 评论(0) 推荐(0)

摘要:Mysql默认关闭远程登录权限,如下操作允许用户在任意地点登录:1. 进入mysql,GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;IDENTIFIED BY后跟的是密码,可设为空。2. FLUSH privileges; 更新以下更具体操作摘自:http://blog.chinaunix.net/u3/117528/showart_2287939.htmlMysql为了安全性,在默认情况下用户只允许在本地登录,可是在有此情况下,还是需要使 阅读全文
posted @ 2011-11-14 09:07 http://guoyinfeng.info/ 阅读(191) 评论(0) 推荐(0)

摘要:select supplier,module,pline,station,date,avg(detail.valuedouble) from `sqm`.`sqm_value_quality_detail` detail , `sqm`.`sqm_station_performance_view` stationwhere detail.valuetype='double' and detail.value_station_id = station.guidgroup by supplier,module,pline,station,date 阅读全文
posted @ 2011-11-09 15:34 http://guoyinfeng.info/ 阅读(141) 评论(0) 推荐(0)

摘要:SQL LEFT JOIN 关键字LEFT JOIN 关键字会从左表 (table_name1) 那里返回所有的行,即使在右表 (table_name2) 中没有匹配的行。LEFT JOIN 关键字语法SELECT column_name(s)FROM table_name1LEFT JOIN table_name2 ON table_name1.column_name=table_name2.column_name注释:在某些数据库中, LEFT JOIN 称为 LEFT OUTER JOIN。原始的表 (用在例子中的):"Persons" 表:Id_PLastNameF 阅读全文
posted @ 2011-11-09 13:15 http://guoyinfeng.info/ 阅读(145) 评论(0) 推荐(0)

摘要:x 阅读全文
posted @ 2011-11-08 16:41 http://guoyinfeng.info/ 阅读(131) 评论(0) 推荐(0)

摘要:x 阅读全文
posted @ 2011-11-08 16:40 http://guoyinfeng.info/ 阅读(112) 评论(0) 推荐(0)