create table test(
id number,
name varchar2(10),
uptime date default sysdate)
uptime字段就是取当前时间自动填充的,如果是固定值就写成default "值"

解决方案 »

  1.   

    如果需要填入复杂的内存可以使用触发器。在每个insert前替换:new值
      

  2.   

    如果字段类型是NUMBER类型的呢
      

  3.   

    可以用序列:
    create sequence se_name
    increment by 1
    start with 1
    maxvalue 100
    minvalue 1
    cycle
    cache 5;
    这样写入表:
    insert into table_name values (se_name.nextval,'zfl')
      

  4.   

    create table scott.emp (
    aaa        char(2),
     comm      NUMBER(9,0)   DEFAULT 111);
    insert into scott.emp (aaa) values ('a');
    select * from scott.emp;