Search code examples
sqldatabaseoracle-databaseoracle-sqldevelopercommit

Oracle sql developer doesn't run commit command on worksheet


Error desc I'm using oracle sql developer version 19.c. When I run the "COMMIT;" command in worksheet the application says;

Unknown Command: COMMIT

The query

update employees_copy A 
set A.salary = (SELECT B.SALARY FROM EMPLOYEES B
                WHERE A.EMPLOYEE_ID = B.EMPLOYEE_ID)
            WHERE A.DEPARTMENT_ID = 100; 

when i check in oracle sql dev. app it shows the right answer but when i check in sqlplus command prompt shows old value.

I tried session exit and login again but did't change the value.


Solution

  • The document I was reading wrote the command like 'COMMIT' uppercase. So I tried to write lowercase 'commit' then it worked. For example you write query in oracle sql developer app.

    step 1 : write your query

    update employees_copy A 
    set A.salary = 2*(SELECT B.SALARY FROM EMPLOYEES B
                    WHERE A.EMPLOYEE_ID = B.EMPLOYEE_ID)
                    WHERE A.DEPARTMENT_ID = 100; 
    

    step 2 : you can commit your changes to database

    commit;
    

    UPDATE

    enter image description here

    I don't know what's the issue maybe it's about setup or something else.