向ORACLE中插入记录:
INSERT INTO TB_BASE_MONEY( vcMoneyCode,vcMoneyName,vcMoneySign,fRate,
vcMemo,vcCreatePerson,dCreateTime,vcAspID,bIsMain)
VALUES('2','美元','USD',8.000000,'','admin','2007-04-25','mulaolao','否')
报'文字与格式字符窜不匹配',好像是'2007-04-25'
请问哪里出错了?
INSERT INTO TB_BASE_MONEY( vcMoneyCode,vcMoneyName,vcMoneySign,fRate,
vcMemo,vcCreatePerson,dCreateTime,vcAspID,bIsMain)
VALUES('2','美元','USD',8.000000,'','admin','2007-04-25','mulaolao','否')
报'文字与格式字符窜不匹配',好像是'2007-04-25'
请问哪里出错了?
但现在报'无法将NULL插入到(TOYERP.TB_BASE_MONEY.NMONEYID)中',NMONEYID是主键,
在SQL SERVER中把NMONEYID定义为自动增长的就可以了,但是在ORACLE中也可以把这个列定义为自动增长的列吗,如可可以怎么定义?
2 start with 1
3 minvalue 1
4 maxvalue 999999999999999999
5 increment by 1
6 noorder;Sequence createdSQL> create trigger tri_test_a before insert
2 on test_a
3 for each row
4 begin
5 select seq_test_a.nextval into :new.id from dual;
6 end;
7 /Trigger createdSQL> insert into test_a(note) values('abc');1 row insertedSQL> insert into test_a(note) values('efg');1 row insertedSQL> select * from test_a; ID NOTE
---------- --------------------------------------------------
1 abc
2 efgSQL>