sql - SQLPLUS dont create row -
i have unusual problem sqlplus connected oracledb 10g. have table sequence , trigger autoincrement id. created script inserting data table. when called form sqlplus goes ok (without error), rows not visible in object browser. when call same command sql command show in table without problems.
any ideas?
creating tables script:
-- create table drivers create table drivers ( id number not null, name varchar2(30) not null, forname varchar2(30) not null, plate_nr varchar2(7) not null, engine number(2,1) default 1.4 null check(engine > 0), -- check allow values meets statement passanger_space number default 3 null check(passanger_space > 0), luggage_space number default 150 null check(luggage_space > 0), primary key (id) -- id unique inside table , important ); create sequence drivers_seq; -- create sequence table create or replace trigger drivers_trg -- create trigger before insert on drivers -- if user want add row table each row begin select drivers_seq.nextval :new.id dual; -- next value (autoincrement) end; /
insert data script:
insert drivers (name,forname,plate_nr,engine,passanger_space,luggage_space) select 'paweł','jakubowski','abc1234',1.4,3,150 dual union select 'piotr','dobrzański','abc4321',1.8,2,null dual union select 'kamil','nowak','77g0d77',2.2,15,500 dual union select 'agnieszka','kowalska','b3au7y6',1.4,3,175 dual ;
Comments
Post a Comment