Preview:
DECLARE
    
    v_ename VARCHAR2(100);

    -- Implicit cursor
    CURSOR c_employee IS SELECT ename FROM employee; -- Replace your_table with the actual table name

BEGIN
    OPEN c_employee;

    -- Fetch and process each row
    LOOP
        -- Fetching data from the cursor into v_ename
        FETCH c_employee INTO v_ename;

         EXIT WHEN c_employee%NOTFOUND;

        -- Update the ename column to uppercase
        UPDATE employee SET ename = UPPER(v_ename);
    END LOOP;

    -- Close the cursor
    CLOSE c_employee;

    -- Output message
    DBMS_OUTPUT.PUT_LINE('All ename values updated to uppercase.');
END;
/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter