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 向各位前辈咨询: 搞PHP开发有前途吗 ? 神奇 502 php与jsp php表单问题 帮我写一个PHP 的记录集并且可以循环5次的代码吧!我是初学者!请最好有注释! 关于布署 PHPCMS后,用注册用户登录后,找不到网页(即自动跳转到登录后首页),请有遇到过此问题的大侠帮忙解决 求救~ 怎样在一个PHP文件中执行另一个PHP文件 给新增的标题后做标记?? 关于数据导入的问题……………………急……在线等 寻求合作开发 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