I have created a table in oracle xe
create table tbl_unit_mst
(
id number(10,0) constraint id_pk primary key,
unit_code char(2) not null constraint unit_code_uk unique,
unit_name varchar2(30) not null constraint unit_name_uk unique,
crtd_date date default sysdate,
is_active number(1,0) default 1 constraint is_active_ck check(is_active in (0,1)),
crtd_by varchar2(6)
);
and then created a squence
create sequence seq_tbl_unit
start with 1
increment by 1
nocache
nocycle;
then I created a Trigger
create trigger trig_id_increment
before insert
on tbl_unit_mst for each row
begin
select seq_tbl_unit.nextval into : new.id from dual;
end;
Now when I am trying to run an insert statement insert into tbl_unit_mst ( unit_code, unit_name) values('01','Ajbapur'); it gives an error SQL Error: No more data to read from socket
If I disable Trigger then it is working fine. can anyone help me to find out where I am making mistakes