mysql中通过身份证计算年纪
2018-01-23 14:22
232 查看
SELECT * FROM ( SELECT borrower_idcard idcard, substring(borrower_idcard,7,8) birth, year(now())- year(substring(borrower_idcard,7,8)) age, borrower_name NAME FROM jr_finance_business_info WHERE loan_time >= 1483200000 AND loan_time < 1514736000 and `status`>=0 and xu_business_id = 0 and borrower_idcard != '' ) t1 where t1.age>=18 and t1.age<=24;
substring()函数用来截取出生年月
year(now())- year(substring(borrower_idcard,7,8)) age, 用来计算年纪
相关文章推荐
- Mysql中通过生日计算年龄的多种方法
- c++操作excel表格通过身份证号计算年龄
- [置顶] 【mysql 计算星座】根据身份证计算用户所属星座
- Mysql 通过经纬度计算与其他多条经纬度的距离
- mysql 通过2个经纬度 计算距离
- MySQL的优化点总结---通过计算多种状态的百分比看MySQL的性能情况
- mysql通过经纬度计算任意亮点的距离
- mysql 通过经纬度计算距离
- Mysql计算出年纪
- js中如何通过身份证号计算出生日期和年龄
- MySql计算两日期时间之间相差的天数,秒数,分钟数,周数,小时数 计算两日期时间之间相差的天数,秒数,分钟数,周数,小时数,这里主要分享的是通过MySql内置的函数 TimeStampDiff()
- 身份证号码的了解------最后一位数字是有前面的十七位数字通过计算得到的
- MySQL的优化点总结---通过计算多种状态的百分比看MySQL的性能情况
- 用户统计 - mysql根据身份证号计算用户年龄
- 通过ODBC与MySQL进行数据交互
- 通过Mysql的语句生成后门木马的方法
- 通过java来批量生成身份证号
- ISBN、一个18位身份证和计算信用卡(Luhns)的算法
- macOS -- Mac系统如何通过终端使用mysql
- 如何通过 MySQL 的二进制日志恢复数据库数据