我是刚从SQL转作ORACL数据库的。
tableAID   CRE  FILLDATE
1    ABC     20070901
2    HH9     20070901
3    HHH     20070902
4    HOH     20070903
要查FILLDATA大于 2007-09-01  小于 2007-09-05 的记录,如何查询?还有
SQL语句中的 。  select top 10 * from tableA 
                select distinct cre from tableA
                select max(cre) from tableA
该如何写?

解决方案 »

  1.   


    select * from tableA where FILLDATE > '20070901' and FILLDATE < '20070905';select * from tableA where rownum<=10;
    select distinct cre from tableA;
    select max(cre) from tableA;
      

  2.   

    日期函數有两個CTOD()和DTOC()。
      

  3.   

    select * from tableA where rownum<=10
    米什么真正含义
    需要里面排序 外面包一层 才可以用
      

  4.   

    用to_date函数转成时间就可以进行时间对比了。
      

  5.   

    同意!应该是:
    select (select * from tableA order by ...) where rownum<=10;
      

  6.   

    上面语句有误,应该是:
    select * from (select * from tableA order by ...) where rownum<=10;
      

  7.   

    ORACL 语法后面是不是要加上分号的?