From the course: Oracle Database 12c: Advanced SQL
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using identity columns - Oracle Database Tutorial
From the course: Oracle Database 12c: Advanced SQL
Using identity columns
- [Instructor] In addition to using Oracle sequences to generate values when inserting data to tables, Oracle version 12C also introduces the concept of identity columns, which behave similarly to Oracle sequences but simplified a process of generating new values when rows are inserted into our database tables. Identity columns are special columns that can be thought of as built-in table sequences. You create a new table in your database, and specify that one of the columns is an identity column. Oracle will create a sequence on your behalf and associate it with the table unlike regular sequences, so that new values will be generated for each row you insert. Let's see an example. Going to our exercise file, let's copy the Create Table statement and paste it to our SQL developer window. Note the ID column in this table is a special column. As you can see it is specified as Number Generated Always As Identity which is the specification that makes this column an identity column. It…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
Introduction to sequences2m 8s
-
(Locked)
Creating sequences7m 6s
-
(Locked)
Using identity columns7m 23s
-
(Locked)
Introduction to table triggers3m 1s
-
(Locked)
Creating triggers5m 24s
-
(Locked)
Introduction to PL/SQL procedures3m 55s
-
(Locked)
Introduction to PL/SQL functions1m 21s
-
(Locked)
Introduction to PL/SQL packages2m 21s
-
(Locked)
Creating PL/SQL procedures and functions7m 40s
-
(Locked)
Creating synonyms4m 24s
-
(Locked)
Creating simple views2m 24s
-
(Locked)
Creating complex views5m 13s
-
(Locked)
-
-