不是人为的那样向student中插值(insert into student values('?','?','?','?'))
?代表实际数据?——————就算是自动的也要通过这个语句实现啊!
排序!
select * from student order by 字段名;

解决方案 »

  1.   

    先insert into student values('?','?','?','?')
    然后使用select * from student order by 字段名;
      

  2.   

    我的意思是如果id号不是通过程序的手段自增
    直接通过oracle怎么实现?
      

  3.   

    First you must create a sequence in you database by the 
    CREATE SEQUENCE student_id INCREMENT BY 1 START WITH 1then you can use it in your INSERT statement
    insert into student values(student_id.CURRVAL,'?','?','?')select * from table_name order by fields_list
      

  4.   

    QL> create sequence sunyu_id INCREMENT BY 1 start with 1序列已建成QL> insert into sunyu values('sunyu_id.currval','lisi');
    nsert into sunyu values('sunyu_id.currval','lisi')
               *
    RROR 位于第 1 行:
    RA-00942: 表或视图不存在
    怎么不可以?
      

  5.   


    SQL> insert into sunyu values(sunyu_id.currval,'li');
    insert into sunyu values(sunyu_id.currval,'li')
                *
    ERROR 位于第 1 行:
    ORA-00942: 表或视图不存在
      

  6.   

    sunyu ,,呵,你写这个干什么,,这个是个sequence,不是表啊,,
     insert into student (sunyu_id.currval,'li');
      

  7.   

    insert into sunyu('sunyu_id.currval','li');如果建了序列sunyu_id,上面的语句不会有错!要是这样 ORA-00942: 表或视图不存在
    就不是语法问题了,是用户权限问题了!
      

  8.   

    我就是研究不通了才来问的,还要就是拥护的权限肯定没有问题,是dba权限
      

  9.   

    为什么现在的csdn和以前的差别怎么就那么大啊~难道没有明白人了?
      

  10.   

    你可以建一个触发器,通过触发器读取序列的当前值,将此值插入到你的目标表,即可。
    create or replace trigger trigger_name before insert on 你的表
    as 
    begin
       select 序列.nextval into :new.id from 序列名;
    end