Oracle Identity Column

0

An Identity column auto increments on input, introduced from Oracle 12C, it’s a useful for the surrogate primary key column.

Syntax:

GENERATED [ ALWAYS | BY DEFAULT [ ON NULL ] ] AS IDENTITY [ ( identity_options ) ]

create table FAQS
(id number(10) GENERATED ALWAYS AS IDENTITY START WITH 1, faq varchar (1000))
;

// add a primary key constraint

ALTER TABLE FAQS
ADD PRIMARY KEY (id);

0 0 vote
Article Rating

I am a Cloud Solutions Engineer working with a leading cloud solutions company. I have more than 5 years’ experience in the Tech ecosystem. I began my career as a software developer. I am a tech enthusiast, an autodidact whose interests includes Data Management, Cloud Native Development, Mobile and Bots Development, Integration, Low Code Development, AI, Analytics just to say the least.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments