PL/SQL – views

Create, use, delete view:

create or replace force view hr.euro_countries -- force: create even when table does not exist
as 
select * from hr.countries
where region_id = 1
with check option; -- do not allow DML for rows which are not visible in this view
--with read only -- do not allow any DML

select * from hr.euro_countries;

drop view hr.euro_countries;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s