0
我作業的一部分。我知道這很基本,但對我來說並不那麼直觀。 我創建這個:基本對象:ORA-00932當INSERT對象類型數據時
CREATE TYPE Address_typ AS OBJECT (
AddressNo NUMBER,
Street VARCHAR2(64),
PostCode VARCHAR2(9),
Town VARCHAR2(64)
);
/
CREATE TYPE Customer_typ AS OBJECT (
CustNo NUMBER,
customer_name VARCHAR2(64),
VAT_NO VARCHAR2(18),
Address_ref REF Address_typ
);
/
CREATE TABLE Address_table OF Address_typ;
CREATE TABLE Customer_table OF Customer_typ
(Address_ref SCOPE IS Address_table);
此插入的工作原理:
INSERT INTO Address_table VALUES(Address_typ(1,'Strumykowa 5','65-001', 'Zielona Góra'));
和一個下面是不是(空Address_table):
INSERT INTO Customer_table VALUES(Customer_Typ(1,'PPUH ZZPD', '12345678901', Address_typ(1,'Strumykowa 5','65-001', 'Zielona Góra')));
我應該如何正確插入到CUSTOMER_TABLE
Customer_typ應該是相對的嗎?......我想沒有必要。 – mallorn