mysql
coolt
这个作者很懒,什么都没留下…
展开
-
关于union之后group by且留下isGroup为1的select
SELECT * FROM ( SELECT ude.*,em.FirstName,em.StaffNo,em.LastName,1 AS isGroup FROM user_deny_emlpoyee AS ude LEFT JOIN employee_master AS em ON(ude.EmpID=em.EmpID) WHERE ude.UserI原创 2013-06-28 14:17:55 · 956 阅读 · 0 评论 -
MySQL Group By 两列
SELECT * FROM miscellaneous WHERE 1=1 AND `MiscType`='EmpSiteBanReasons' AND `MiscStatus`='A' GROUP BY MiscBigType,MiscName ORDER BY `MiscBigType` ASC原创 2013-07-30 17:20:50 · 3432 阅读 · 1 评论 -
xampp重置密码
xampp 第一次设置密码很方便,于是我随便设置了一个,哪知要改的时候就麻烦了,几经周折才找到如下方法 C:\xampp-portable\mysql\bin\mysqladmin -u root -p password 新密码原创 2013-07-25 17:09:25 · 1068 阅读 · 0 评论 -
SQL 截取字符串
SQL 截取字符串 Select Left(@S1,4) 截取从字符串左边开始N个字符 Select right(@S1,11) 截取从字符串右边开始N个字符 http://www.jb51.net/article/19381.htm转载 2013-07-31 16:50:35 · 825 阅读 · 0 评论 -
mysql根据出生日期计算年龄
DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(BirthDate)) ,'%Y') +0 AS Age SELECT a.*,DATE_FORMAT(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(BirthDate)) ,'%Y') +0 AS Age,b.City,c.Name FROM `employee_maste原创 2013-10-10 10:35:27 · 4153 阅读 · 1 评论