php里高级sql语句问题?求助高手! SELECT * FROM table WHERE id LIKE '01%'; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SELECT * FROM table WHERE id LIKE '01% '; 这样不可以,因为我还有些数据是 01 02 03 两位的;substring(id,0,2)这样也是错误的,我也试过。继续求助 可是使用LIKE的话那么像0201,0301等不是也取出来了吗?期待解答 select id,name from news where substring(id,1,2)=01 (不要 as id )我测试拉在 postgressql中通过,不知道楼主是什么DB. select id,name from news where substring(id,1,2)=01 或者select id,name from news where id like '01%' select id, substring(id,0,2) as sid ,name from news where substring(id,0,2) = '01%' 这样是应该是的。 select *from tmpwhere substring(id,1,2)=01 or substring(id,1,2)=02 or substring(id,1,2)=03 求专业人士帮助解决网站小问题 请教管理信息系统的流程实现 请教,在和mysql合用时,如何把取得sql中的结果直接给变量 类方法中使用array_map报错--- Cannot redeclare mysql4+php5+windows2003+IIS安装后 php 程序不能运行. 想在北京找php工作 php有没有什么在各平台通用的锁或者其他的同步机制? 如何禁止apache显示目录文件列表 为何不能连接MYSQL数据库? FTP映射网络位置到本地电脑 寻求合作开发 nusoap代理的问题
substring(id,0,2)这样也是错误的,我也试过。
继续求助
期待解答
(不要 as id )我测试拉在 postgressql中通过,不知道楼主是什么DB.
或者
select id,name from news where id like '01%'
这样是应该是的。
*
from
tmp
where
substring(id,1,2)=01 or substring(id,1,2)=02 or substring(id,1,2)=03