?? key_preserve_table.txt
字號:
Key-Preserved Tables
The concept of a key-preserved table is fundamental to understanding
the restrictions on modifying join views. A table is key preserved
if every key of the table can also be a key of the result of the join.
So, a key-preserved table has its keys preserved through a join.
多對一的多方為Key-Preserved Tables。
--沒有PK
CREATE TABLE sm_saleorderlist(
TransactionID NUMBER(10) NOT NULL UNIQUE,
TotalPrice NUMBER(7,2) NOT NULL,
EmployID CHAR(10) NOT NULL,
SaleTime DATE NOT NULL,
);
DROP TABLE SM_EMP;
CREATE table sm_emp
(EmpID CHAR(10) ,
Name VARCHAR2(10) ,
salary NUMBER(8,2),
TelNo CHAR(8));
CREATE OR REPLACE VIEW sm_saleorderview AS
SELECT sm_saleorderlist.TransactionID,sm_saleorderlist.TotalPrice ,sm_saleorderlist.EmployID ,
sm_emp.Name,sm_emp.TelNo,
sm_saleorderlist.SaleTime
FROM sm_saleorderlist,sm_emp
WHERE sm_saleorderlist.EmployID=sm_emp.empid;
SELECT * FROM USER_UPDATABLE_COLUMNS
WHERE TABLE_NAME='SM_SALEORDERVIEW';
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -