2 Day Developer > Using SQL > Using Data Definition Langu... > Creating and Dropping a Syn...
Creating and Dropping a Synonym With SQL |
Previous |
Next |
Example: Creating a Synonym Using SQL shows how to create a synonym that is an alias for the employees
table. For more information about synonyms, see "Managing Synonyms".
Creating a Synonym Using SQL
-- create a synonym for the employees table CREATE SYNONYM emps for HR.employees; -- query the employees table using the emps synonym SELECT employee_id, last_name FROM emps WHERE employee_id < 105;
Example: Dropping a Synonym Using SQL show how to drop a synonym.
For information about creating and dropping a synonym with the Object Browser page, see "Creating a Synonym" and "Dropping a Synonym".