Oracle Identity column || كثرة الاصدارات للاوراكل لها اسباب

Опубликовано: 22 Март 2026
на канале: khaled alkhudari
1,015
102

Oracle Identity column || كثرة الاصدارات للاوراكل لها اسباب
create table students
( id number,
name varchar2(200),
constraint students_pk primary key (id)
);

create sequence students_seq
start with 1;

create or replace trigger students_gen_id
before
insert on students
for each row
begin
:new.id:=students_seq.nextval;
end;

insert into students (name) values ('khaled');
insert into students (name) values ('ali');

select * from students;
---------------------------------------
drop table students;
drop sequence students_seq;

create table students
( id number GENERATED ALWAYS AS IDENTITy,
name varchar2(200),
constraint students_pk primary key (id)
);

insert into students (name) values ('ahmed');

select * from students;


https://www.oracletutorial.com/oracle....