主题:数据清理 - 检查异常值 - 不正常
我正在尝试将 custID 从值“A123”更新为“123”,将“22A4”更新为“224”我只想将整数保留在 custID 中,我不希望 custID 包含任何非整数字符(A 到 Z 和a 到 z)
CREATE TABLE customer (
custID VARCHAR2(10) PRIMARY KEY,
custName VARCHAR2(30)
);
INSERT INTO customer(custID,custName) VALUES ('A123','Angel');
INSERT INTO customer(custID,custName) VALUES ('22A4','Chris');
INSERT INTO customer(custID,custName) VALUES ('2333','Chris');
UPDATE customer
SET custID = -- I want to change 'A123' to '123', '22A4' to '224'
WHERE ;