Skip to Content
0
Former Member
Nov 14, 2009 at 06:08 AM

Insert/Update fields into custom table by checking key field

500 Views

Hi,

I have to two tables like Dept in which fields are

DEPT

===========

CLNT

DEPTID( PK )

,DEPTNAME.

Another table is EMP, the fields are

EMP

============

CLNT

EMPID(PK)

DEPTID(PK)

EMPNAME.

In this created a foreign key relation ship withEMP-DEPTID = DEPt-Deptid.

In program

I want to insert some records to my custom table EMP.

There It should accept only emp-deptid value if it exists in Dept-deptid.

what statement I should write.

When I write " insert into zEMP values <workarea>.