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.
Creating simple views - Oracle Database Tutorial
From the course: Oracle Database 12c: Advanced SQL
Creating simple views
- A view is essentially a SQL query that is stored as a database object, and can be accessed using, well, other SQL queries. As we'll see in a moment, views act like tables, but they do not, and this is very important, store the result of the query, or physically take space in your database. So, let's create our very first view. To do that, you can type create or replace view, and type the view name. For example, emp_sales. Then we'll type as, and the query we wish to be stored as part of the view. So, for example, select * from employees where job id='SA_MAN'; short for salesman. Let's create this view. Note that typing create or replace with views, similarly to many other Oracle schema objects, such as procedures, synonyms, and so on, will overwrite an existing view if one exists. But a create view, without replace command, is also applicable. However, if the view already exists, we will get an error that the view already exists. Once our view has been created, we can actually query…
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)
-
-