Skip to content

Tag: sql-update

Update and renew data based on data in other tables

There are 3 tables student, course, and takes as following tot_cred column data in the student table now is assigned with random values (not correct), I want to perform the query that updates and renews those data based on the course’s grade each student has taken. For those students who received F grade will be excluded and those who didn’t

When I update the same row in a table in SQL more than once, it gives an ORA-00001: unique constraint error

I am trying to update a row in a table in SQL back to back and am getting an error when running the second update statement. I’m getting an error in the second update statement. ORA-00001: unique constraint (ADMIN.JHIST_EMP_ID_ST_DATE_PK) violated ORA-06512: at “ADMIN.ADD_JOB_HISTORY”, line 10 ORA-06512: at “ADMIN.UPDATE_JOB_HISTORY”, line 2 ORA-04088: error during execution of trigger ‘ADMIN.UPDATE_JOB_HISTORY’ I was expecting