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方面的基础资料最好是PPT 急啊~300分问这个问题了postgressql的 mysql 非常难的问题,有人知道吗? 能建数据库,可是建表失败??? mysql中文问题 关于联合主键与分区表的问题,到底是一个还是多个索引 通过表单提交数据到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%'就出来了