Я создал триггер, но я не знаю, как его использовать.
кто-нибудь может мне помочь?
create or replace trigger user_id_trigger
before insert on library_user
for each row
begin
if :new.user_id is null then
select USER_ID_O_SEQ.nextval into :new.user_id from library_user;
end if;
end;
create table LIBRARY_USER( USER_ID number (20) primary key not null,
FIRST_NAME varchar (50) not null,
LAST_NAME varchar (50) not null,
USER_BDATE date not null,
USER_ADRESS varchar (200) not null,
USER_EMAIL varchar (50) not null,
USER_PHONE_NUMBER varchar (25),
USER_STATUS varchar (20) not null,
USERNAME varchar (50) not null,
PASSWORD varchar (50) not null);