Oracle SQL - A violation of a primary key constraint in INSERT statement

Introduction

The following example shows a violation of a primary key constraint; department 10 already exists.


insert into departments(dname,location,deptno)
values('CATERING','ORLANDO', 10);

insert into departments(dname,location,deptno)
*
ERROR at line 1:
ORA-00001: unique constraint (BOOK.D_PK) violated

Related Topic