File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
data-platform/autonomous-database/autonomous-json/oracle23ai-json-views-support Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ drop view empview;
2+ drop view deptview;
3+ drop table departments cascade constraints;
4+ drop table employees cascade constraints;
5+
6+ create table departments
7+ as
8+ select *
9+ from hr .departments ;
10+
11+ create table employees
12+ as
13+ select *
14+ from hr .employees ;
15+
16+ alter table departments add primary key (department_id);
17+ alter table employees add primary key (employee_id);
18+
19+ create or replace json collection view empview
20+ as
21+ select json{' _id' : employee_id,
22+ last_name,
23+ hire_date,
24+ salary}
25+ from employees;
26+
27+ select *
28+ from user_json_collections;
29+
30+ create or replace json relational duality view deptview as
31+ select json {' _id' : department_id,
32+ ' dname' : department_name,
33+ ' location' : location_id}
34+ from departments with insert update delete ;
35+
You can’t perform that action at this time.
0 commit comments