mysql 截取字符串 对比当前的时间 (年份) 表: A 表 id PK birthday varchar(11) name varchar(20) 1 2011-12-03 joe 2 1989-12-03 bin用sql语句查询 12岁的那些人 只比较年份. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from a where year(now())-year(birthday)=12; select * from a where 2011-left(birthday,4)=12; select * from a where left(birthday,4)=2011-12; 2011-12=1999给birthday加一个索引,然后直接这样select * from a where birthday like '1999%'就出来了 求用于mysql的查询方法 mysql数据库还是免费吗?我要到哪里下载?能给个连接吗?谢谢 EMS SQL Manager 2005 Lite for MySQL 问题 关于c语言中数据库查询数据库中不存在数据,但却没有任何提示的问题 在mysql中插入中文 创建表失败,并提示莫名错误,请教高手们是怎么回事 MySQL如何实现定时任务? 一天弄懂一个问题? 请教一个导数据的问题?急! mysql数据库服务启动成功但是 命令提示找不到 什么?? 这是mysql与mssql的区别?? 为什么我的left join和inner join得出的数据是一样的?
select * from a where year(now())-year(birthday)=12;
给birthday加一个索引,然后直接这样
select * from a where birthday like '1999%'就出来了