创建名为biufer_customer的触发器,该触发器在插入或更新customer表中的列passwd之前启动。触发器应验证密码正好是六个字符,不多也不少。除非此要求得到满足,否则触发器应停止交易并确认发生此错误。PL/SQL创建触发器
create or replace trigger biufer_customer
before insert or update
of passwd
on customer
for each row
when (new.passwd <> 6)
begin
raise_application_error(-20001,'Wrong password!');
end;
/
你是什么实际问题?我们不只是为你做你的任务。这是什么代码?你尝试过运行它吗?它是否导致错误?那是什么? –
什么是特殊字符,即非ASCII字符?很多时候建议您使用特殊字符作为密码。你可以以不同的方式计算,请参阅[LENGTH](http://docs.oracle.com/database/121/SQLRF/functions100.htm#SQLRF00658) –
我错过了长度函数,现在的代码工作:) – Skorpan