Create a trigger which gets triggered when there is any inserting or updating on phone number column of the customer table and this trigger has to capture the customer number and check that number having 10 digits or not.
create or replace trigger number_trigger before insert or update on customers for each row begin if length(:old.customer_number)>10 then raise_application_error(-20500,'length is exceeded'); elseif inserting then dbms_output.put_line('number inserting'); elseif updating then dbms_output.put_line('updating number'); end if; end; /
if length(:old.customer_number)>10
if length(:new.customer_number)>10
BETWEEN 1000000000 AND 9999999999
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)