Today, when querying a view, the query has a ROWID field, which results in an error:
Two simple table tests were made: Student,class
1. Create a table
CREATE TABLE STUDENT
(
Sno Number,
Sname VARCHAR2 (32)
)
-----------------------------------
CREATE TABLE CLASS
(
CNO number is not NULL,
Sno number is not NULL,
CNAME VARCHAR2 (32)
)
2. Create a View
Create or replace view Stu_class_v as
Select S.sno, S.sname, C.cno, C.cname
From student S, Stu_class c
where S.sno = C.sno
3. Query the View
Select rowID, sno from Stu_class_v
You will be quoted as a mistake.
Because the two new tables, the main table and the table are not set the corresponding primary key, here the student table to add the primary key, and then query the view, query normal
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
ora-01445: Cannot select rowID or sampling from the connection view of a table with reserved keywords