PROCEDURE UPDATE_CLIENT CLIENT_ID NUMBER COLUMN_NAME VARCHAR2 NEW_VALU

1
2
3
4
5
6
7
8
9
PROCEDURE UPDATE_CLIENT (CLIENT_ID NUMBER, COLUMN_NAME VARCHAR2, NEW_VALUE VARCHAR2) IS
BEGIN
EXECUTE IMMEDIATE
'UPDATE CLIENT SET ' || COLUMN_NAME || ' = ' || NEW_VALUE || ' WHERE CLIENT.ID = ' || TO_CHAR(CLIENT_ID);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE('TABLE NOT FOUND');
END UPDATE_CLIENT;