From the course: Oracle Database 12c: Advanced SQL
Unlock the full course today
Join today to access over 23,700 courses taught by industry experts.
Creating synonyms - Oracle Database Tutorial
From the course: Oracle Database 12c: Advanced SQL
Creating synonyms
- [Instructor] An Oracle synonym allows you to create a pointer to an object that exists somewhere else in your database. Essentially, a synonym is an alternative name for your database schema object, such as tables, views, sequences, store procedures, and other schema objects. Creating synonyms in Oracle is extremely easy, and accomplished using the create synonym command. For example, I can type create synonym, followed by the synonym name, say emp, shorthand for employees, for, and then the schema.table name, so hr.employees. What I'm essentially doing here is creating an alias called emp which points to the hr.employees table. Let's execute the command and see that our synonym was created. By the way, if a synonym already exists and you want to redefine it or change it, you can simply use the or replace phrase as part of the command. So create or replace synonym. The same create or replace trick holds true for many different Oracle schema object, such as store procedures, views…
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)
-
-