更改表格事务以确保交易类型应为Deposit
或Withdrawal
且transaction type
不能为空
代码:
alter transaction type buses
add CUSTOMER varchar2(255);
如何添加约束
答案 0 :(得分:0)
您可以使用check
约束:
ALTER TABLE transactions
ADD CONSTRAINT transactions_type_ck
CHECK (transaction_type IN ('Deposit', 'Withdrawal'));