??????????????
???????????? ???????[ 2012/11/2 10:21:45 ] ????????
??????4.2????????ó???????????Schema??????
??????4.3????????????????Ч???
??????????????????????????????????罫?????Customer.Balance?????Account.Balance??????????λ???????????????????????
??????4.4???????????????
?????? ????????Schema??
???????????????????????Account.Balance?к?????????????SynchronizeAccountBalance??SynchronizeCustomerBalance??
?????????μ?DDL????
ALTER TABLE Account ADD Balance Numeric;
COMMENT ON Account.Balance 'Move of Customer.Balance column?? finaldate=2006-06-14';
CREATE OR REPLACE TRIGGER SynchronizeCustomerBalance
BEFORE INSERT OR UPDATE
ON Account
REFERENCE OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
BEGIN
IF :NEW.Balance IS NOT NULL THEN
UpdateCustomerBalance;
END IF
END;
/
COMMENT ON SynchronizeCustomerBalance 'Move of Customer.Balance column to Account??
dropdate = 2006-06-14';
CREATE OR REPLACE TRIGGER SynchronizeAccountBalance
BEFORE INSERT OR UPDATE OR DELETE
ON Customer
REFERENCE OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
BEGIN
IF DELETING THEN
DeleteCustomerIfAccountNotFound;
END IF
IF (UPDATING OR INSERTING) THEN
IF :NEW.Balance IS NOT NULL THEN
UpdateAccountBalanceForCustomer;
END IF;
END IF;
END;
/
COMMENT ON SynchronizeAccountBalance 'Move of Customer.Balance column to Account?? dropdate=2006-06-14'
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11