Examine the structure of the Employee table:
Column Name
DataType
Constraint
Empname
Varchar2(20)
Not Null
EmpId
Number(10)
PK
Phoneno
Number(10)
NotNull
DeptId
Number(10)
FK
Data in the Department table:
DeptId
Dname
Location
1
Sales
Mumbai
2
Marketing
Kolkata
Which update statement produces the following error?
ORA-02291: integrity constraint (SYS_C23) violated - parent key not found
Answers
Answered by
2
Answer:
It can be established in either an ALTER TABLE or CREATE TABLE statement.
example:.
CREATE TABLE employees
( employee_id numeric (20) not null,
employee_name varchar2(75) not null,
supervisor_name varchar2(75),
CONSTRAINT employee_pk PRIMARY KEY (employee_id)
);
Explanation:
This means that you attempted to execute a reference to a certain table using a primary key. However, in the process of doing so, the columns that you specified failed to match the primary key. The error can also be triggered when referencing a primary key that does not exist for the table in question. The primary key is a unique key.
Answered by
35
Answer:
UPDATE Employee SET Deptid=3 WHERE Empid=101
Similar questions
Computer Science,
5 months ago
Computer Science,
10 months ago
Social Sciences,
10 months ago
Math,
1 year ago
Math,
1 year ago
Hindi,
1 year ago