A) 每个抄表员在当月抄表的次数(这个视图应该可以随时使用,无需更改以适应日期)。
读数表
Name Null Type
--------------- -------- ------------
READINGID NOT NULL VARCHAR2(4)
READINGDATA NUMBER(10)
READINGDATE DATE
METERSERIALNO VARCHAR2(10)
EMPLOYEEID VARCHAR2(10)
LASTREADINGDATA NUMBER(10)
员工表
Name Null Type
-------------------- -------- ------------
EMPLOYEEID NOT NULL VARCHAR2(10)
FIRSTNAME VARCHAR2(20)
LASTNAME VARCHAR2(20)
NUMBEROF_METERS_READ NUMBER(10)
我的答案
create or replace view ViewA as
select E.EmployeeID as Employee, E.FirstName, E.Numberof_Meters_Read, R.ReadingDate
from Employee E
join
Readings R
on (R.EmployeeID = E.EmlpoyeeID);
Oracle 显示“标识符无效”。需要帮忙!!