实现日期加一天
select to_char(to_date('200307','yyyymm')+1,'yyyymmdd') rdt,0 c1
  from dual

解决方案 »

  1.   

    我是希望能在定义的时候实现,比如:
    create table a(
    col varchar(15) default (这里希望能自动排序的字段)

    该怎么实现啊?
      

  2.   

    自动加1字段建立?create table a(b int, cvarchar2(5));建一个序列create sequence a_seq increment by 1 start with 100;建一个触发器create or replace trigger t_abefore insert on afor each rowbeginselect s_a.nextval into :new.b from dual;end;
      

  3.   

    wylwyl1130(落雪山林)写的很清楚了.
    insert into table values(to_char(sysdate,'yyyy')||'-'||lpad(test_seq.nextval,4,'0'));