![Free-eBooks.net](/resources/img/logo-nfe.png)
![All New Design](/resources/img/allnew.png)
table, A foreign key can be defined in either a CREATE TABLE statement or an ALTER TABLE statement,
There are two tables defined as raak-trans-master and raak-trans-detail, The linking key between these tables are voucher-number, In the raak-trans-master, only one record will be maintained for every voucher since voucher-number unique and multiple records will be maintained in raak-trans-Detail on the same voucher-number, In otherwise, if one wants to add record in raak-trans-file, the given voucher-number must exist in the raak-trans-master file otherwise transactions will be denied,
The foreign key constraint should be raised in detail file i,e, on raak-trans-detail,
→ Object Browser under default table option
→ RAAK-TRANS-DETAIL
→ constraints
→ create
→ change the default constraint name as
raak-trans-detail-fk1 as constraint name
→ Foreign Key as constraint type