一个简单的SQL语句问题,解决马上结帖! select * from twhere substr(col,3) in (09,10) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 --用'09','10'会是严格点:select * from twhere substr(col,3) in ('09','10') JeromeLiu(烛光) 能解释一下substr(col,3)吗? 通过substr系统函数取得4位数字中的后两位在通过查询关键字in(等同与 .. or .. or..)来限制结果。 select * from t where substr(col,3) between 9 and 10; substr的用法:16:22:08 SQL> select substr('1234',3) from dual;SU--34已用时间: 00: 00: 00.3116:24:02 SQL> select substr('1234',3,1) from dual;S-3已用时间: 00: 00: 00.3116:24:10 SQL> 详细的参考请访问:http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions119a.htm#SQLRF06114 数据库主键int类型,自动增长列,标识列,每次自动增长,增长到int类型的长度放不下了怎么办? 程序问题 求一个sql语句,返回两个日期参数之间的连续年月 定义列名长度的困惑 oracle 数据库 为何oracle commit 时会报ORA-00018: 超出最大会话数错误! 一个小问题 关于排序问题,在线等... 请教:全局数据库名与SID有什么区别,如何修改她们? 怎么赋sysdba的权限给用户? 在oracle中如何添加作业? ***这个sql怎么写?***
select * from t
where substr(col,3) in ('09','10')
在通过查询关键字in(等同与 .. or .. or..)来限制结果。
where substr(col,3) between 9 and 10;
--
34已用时间: 00: 00: 00.31
16:24:02 SQL> select substr('1234',3,1) from dual;S
-
3已用时间: 00: 00: 00.31
16:24:10 SQL>
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions119a.htm#SQLRF06114