Computer Science, asked by manishjhurani11, 10 months ago

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 durgapujitha248
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 rajnitin1999
35

Answer:

UPDATE Employee SET Deptid=3 WHERE Empid=101

Similar questions