我认为应该是select * from A where A.col like '[1-9]%';但实验了下,好像不对,请教下,谢谢~~ 

解决方案 »

  1.   


    我也想知道 呵呵
    傻一点的办法select * from A where A.col like '0%' or like '1%' or 。
      

  2.   

    select * from A 
    where substr(A.col,1,1) between 0 and 9
      

  3.   

    貌似 substr 速度很慢,
      

  4.   

     --对正则表达式不太熟悉,试着写下
    21:22:52 SQL> select * from emp where regexp_like(ename,'^[0-9]');     EMPNO ENAME      JOB              MGR HIREDATE              SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- -------------- ---------- ---------- ----------
          7369 0SMITH     CLERK           7902 17-12月-80            800        900         20
          7499 0ALLEN     SALESMAN        7698 20-2月 -81           1600        300         30
          7521 0WARD      SALESMAN        7698 22-2月 -81           1250        500         30
          7566 0JONES     MANAGER         7839 02-4月 -81           2975        900         20
          7654 0MARTIN    SALESMAN        7698 28-9月 -81           1250       1400         30
          7698 0BLAKE     MANAGER         7839 01-5月 -81           2850                    30已选择6行。
      

  5.   

    select * from A where regexp_like(a.col,'^[0-9].*')
      

  6.   

    http://blog.csdn.net/small_ant2008/archive/2008/05/04/2375101.aspx
    楼主看看这个 
      

  7.   

    强大的regexp_like 
    oracle 10g的正则表达式
    '^' 匹配输入字符串的开始位置。
    [TEST1@orcl#30-11月-10] SQL>select * from t4;NAME
    ------------------------------
    1abc
    zhangsan
    lisi
    wang_wu[TEST1@orcl#30-11月-10] SQL>select * from t4 where regexp_like (name,'^[0-9]');NAME
    ------------------------------
    1abc
      

  8.   


    SQL> select * from test where regexp_like(field1,'^[0-9]');
      

  9.   


    select * from A where regexp_like(a.col,'^[0-9].*')
      

  10.   

    regexp_like …………
    学好这东西真困难,得坚持啊……
    努力学习oracle中……
      

  11.   

    select * from A where  regexp_like(A.col,'^[0-9]+')
      

  12.   

    ascii(substr(col,1,1)) >= 49 
    and ascii(substr(col,1,1)) <= 57
      

  13.   

    select * from test where regexp_like(field1,'^[0-9]');
      

  14.   

    regexp_like这个函数解决你的问题应该可以。oracle的正则函数还是很强大的,速度也还可以。