Alter Table %SCHEMA%.G1102ABTLST ADD (CONSTRAINT  ABLABT_O1002ABTEILUNG_FK FOREIGN KEY (ABLABT) REFERENCES %SCHEMA%.O1002ABTEILUNG(ABTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1102ABTLST ADD (CONSTRAINT  ABLVAB_O1102ABTGRUPPEN_FK FOREIGN KEY (ABLVAB) REFERENCES %SCHEMA%.O1102ABTGRUPPEN(VABABT) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1103KSTLST ADD (CONSTRAINT  KSLKST_O1103KSTGRUPPEN_FK FOREIGN KEY (KSLVKS) REFERENCES %SCHEMA%.O1103KSTGRUPPEN(VKSKST) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1103KSTLST ADD (CONSTRAINT  KSTKST_O1003KSTSTELLE_FK FOREIGN KEY (KSLKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.G1104KTRLST ADD (CONSTRAINT  KTLKTR_O1004KSTTRAEGER_FK FOREIGN KEY (KTLKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1104KTRLST ADD (CONSTRAINT  KTLVKT_O1104KTRGRUPPEN_FK FOREIGN KEY (KTLVKT) REFERENCES %SCHEMA%.O1104KTRGRUPPEN(VKTKTR) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1105KRTLST ADD (CONSTRAINT  KRLKRT_O1005KSTART_FK FOREIGN KEY (KRLKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1105KRTLST ADD (CONSTRAINT  KRLVKR_O1105KRTGRUPPEN_FK FOREIGN KEY (KRLVKR) REFERENCES %SCHEMA%.O1105KRTGRUPPEN(VKAKRT) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1202MENUELST ADD (CONSTRAINT  MELMEN_O1202MENUE_FK FOREIGN KEY (MELMEN) REFERENCES %SCHEMA%.O1202MENUE(MENNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1202MENUELST ADD (CONSTRAINT  MELFRM_O1201FORMULAR_FK FOREIGN KEY (MELFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.G1301FRMRTE ADD (CONSTRAINT  FRMRTENUM_O1301FRMRECHT_FK FOREIGN KEY (FRMRTENUM) REFERENCES %SCHEMA%.O1301FRMRECHT(FRENUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1301FRMRTE ADD (CONSTRAINT  FRMRTEFRM_O1201FORMULAR_FK FOREIGN KEY (FRMRTEFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.G1301RTRRTE ADD (CONSTRAINT  RTRRTERTR_O1201FORMULAR_FK FOREIGN KEY (RTRRTERTR) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1301RTRRTE ADD (CONSTRAINT  RTRRTEFRM_O1201FORMULAR_FK FOREIGN KEY (RTRRTEFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.G1302FRMRTELST ADD (CONSTRAINT  FRMRTENAM_G1301FRMRTE_FK FOREIGN KEY (FRMRTENAM,FRMRTEFMR) REFERENCES %SCHEMA%.G1301FRMRTE(FRMRTENUM,FRMRTEFRM)   );
Alter Table %SCHEMA%.G1303FRMRTESCHALT ADD (CONSTRAINT  FRTSFLFRM_O1803FRMSCHALTLST_FK FOREIGN KEY (FRTSFLFRM,FRTSFLNUM) REFERENCES TMSYSTEM.O1803FRMSCHALTLST(FRMSFLFRM,FRMSFLSCH)   );
Alter Table %SCHEMA%.G1303FRMRTESCHALT ADD (CONSTRAINT  FRTSFLRTE_O1301FRMRECHT_FK FOREIGN KEY (FRTSFLRTE) REFERENCES %SCHEMA%.O1301FRMRECHT(FRENUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1401MENRTELST ADD (CONSTRAINT  MRLMEN_O1202MENUELST_FK FOREIGN KEY (MRLMEN) REFERENCES %SCHEMA%.O1202MENUE(MENNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1401MENRTELST ADD (CONSTRAINT  MRLMRT_O1401MENRECHT_FK FOREIGN KEY (MRLMRT) REFERENCES %SCHEMA%.O1401MENRECHT(MRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1402MENFORM ADD (CONSTRAINT  MFRFRM_O1201FORMULAR_FK FOREIGN KEY (MFRFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1402MENFORM ADD (CONSTRAINT  MFRMRT_O1401MENRECHT_FK FOREIGN KEY (MFRMRT) REFERENCES %SCHEMA%.O1401MENRECHT(MRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1403MENDATEN ADD (CONSTRAINT  MDLFLD_TMS100TBS_FK FOREIGN KEY (MDLFLD) REFERENCES TMSYSTEM.TMS100TBS(TBSFNA) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1403MENDATEN ADD (CONSTRAINT  MDLMRT_O1401FRMRECHT_FK FOREIGN KEY (MDLMRT) REFERENCES %SCHEMA%.O1401MENRECHT(MRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1501FCDLISTE ADD (CONSTRAINT  FRLFCD_TMS131FCD_FK FOREIGN KEY (FRLFCD) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1501FCDLISTE ADD (CONSTRAINT  FRLFRT_O1501FCDRECHT_FK FOREIGN KEY (FRLFRT) REFERENCES %SCHEMA%.O1501FCDRECHT(FRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1602PNRRTEAKR ADD (CONSTRAINT  RAKAKR_O1001ABRKREIS_FK FOREIGN KEY (RAKAKR) REFERENCES %SCHEMA%.O1001ABRKREIS(AKRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1603PNRRTEABT ADD (CONSTRAINT  RABABT_O1002ABTEILUNG_FK FOREIGN KEY (RABABT) REFERENCES %SCHEMA%.O1002ABTEILUNG(ABTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1604PNRRTEKST ADD (CONSTRAINT  RKSKST_O1003KSTSTELLE_FK FOREIGN KEY (RKSKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.G1606PNRRTEKRT ADD (CONSTRAINT  RKRKRT_O1005KSTART_FK FOREIGN KEY (RKRKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.G1607PNRRTEKTR ADD (CONSTRAINT  RKTKTR_O1004KSTTRAEGER_FK FOREIGN KEY (RKTKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.G1701ZKTLST ADD (CONSTRAINT  ZKLNUM_O1701ZKTGRP_FK FOREIGN KEY (ZKLNUM) REFERENCES %SCHEMA%.O1701ZKTGRP(ZKGNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1701ZKTLST ADD (CONSTRAINT  ZKLZKT_TMS103ZKT_FK FOREIGN KEY (ZKLZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1802SCHALTLST ADD (CONSTRAINT  SFGSRT_O1802SCHALTRTE_FK FOREIGN KEY (SFGSRT) REFERENCES %SCHEMA%.O1802SCHALTRTE(SRTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.G1901REPTOOLLST ADD (CONSTRAINT  RTLFLD_TMS100TBS_FK FOREIGN KEY (RTLFLD) REFERENCES TMSYSTEM.TMS100TBS(TBSFNA) ON DELETE CASCADE );
Alter Table %SCHEMA%.G2006TRMDNLLST ADD (CONSTRAINT  TDLNAM_G2006DATDNLLST_FK FOREIGN KEY (TDLNAM,TDLTYP) REFERENCES %SCHEMA%.G2006DATDNLLST(DDLNAM,DDLTYP) ON DELETE CASCADE );
Alter Table %SCHEMA%.O1001ABRKREIS ADD (CONSTRAINT  AKRLUG_TMS171LUG FOREIGN KEY (AKRLUG) REFERENCES %SCHEMA%.TMS171LUG(LUGLUG)   );
Alter Table %SCHEMA%.O1001ABRKREIS ADD (CONSTRAINT  AKRVWS_O1001ABRKREIS_FK FOREIGN KEY (AKRVWS) REFERENCES %SCHEMA%.O1001ABRKREIS(AKRNUM)   );
Alter Table %SCHEMA%.O1002ABTEILUNG ADD (CONSTRAINT  ABTLST_O1002ABTEILUNG_FK FOREIGN KEY (ABTLST) REFERENCES %SCHEMA%.O1006LEISTUNG(LSTNUM)   );
Alter Table %SCHEMA%.O1002ABTEILUNG ADD (CONSTRAINT  ABTVWS_O1002ABTEILUNG_FK FOREIGN KEY (ABTVWS) REFERENCES %SCHEMA%.O1002ABTEILUNG(ABTNUM)   );
Alter Table %SCHEMA%.O1003KSTSTELLE ADD (CONSTRAINT  KSTLST_O1003KSTSTELLE_FK FOREIGN KEY (KSTLST) REFERENCES %SCHEMA%.O1006LEISTUNG(LSTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.O1003KSTSTELLE ADD (CONSTRAINT  KSTVWS_O1003KSTSTELLE_FK FOREIGN KEY (KSTVWS) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.O1004KSTTRAEGER ADD (CONSTRAINT  KTRLST_O1006LEISTUNG_FK FOREIGN KEY (KTRLST) REFERENCES %SCHEMA%.O1006LEISTUNG(LSTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.O1005KSTART ADD (CONSTRAINT  KRTLST_O1006LEISTUNG_FK FOREIGN KEY (KRTLST) REFERENCES %SCHEMA%.O1006LEISTUNG(LSTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.O1601PNRRECHT ADD (CONSTRAINT  PRENUM_O1602PREKOPF_FK FOREIGN KEY (PRENUM) REFERENCES %SCHEMA%.O1602PREKOPF(PRKNUM)   );
Alter Table %SCHEMA%.O3000ANL ADD (CONSTRAINT  O3000ANL_FK FOREIGN KEY (ANLFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.O3000PRT ADD (CONSTRAINT  SYS_C009401 FOREIGN KEY (PRTFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.O3001BCH ADD (CONSTRAINT  O3001BCH_FK FOREIGN KEY (BCHFCD) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.O3001ZSD ADD (CONSTRAINT  SYS_C009414 FOREIGN KEY (ZSDFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.O3001ZST ADD (CONSTRAINT  SYS_C009420 FOREIGN KEY (ZSTFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.O3001ZZK ADD (CONSTRAINT  SYS_C009425 FOREIGN KEY (ZZKFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.TMS103FRMFIL ADD (CONSTRAINT  FILFLD_TMS100TBS_FK FOREIGN KEY (FILFLD) REFERENCES TMSYSTEM.TMS100TBS(TBSFNA)   );
Alter Table %SCHEMA%.TMS103FRMFIL ADD (CONSTRAINT  FILFRM_O1201FORMULAR_FK FOREIGN KEY (FILFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS103FRMKTP ADD (CONSTRAINT  KTPFRM_O1201FORMULAR_FK FOREIGN KEY (KTPFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS103FRMKTV ADD (CONSTRAINT  KTVFRM_O1201FORMULAR_FK FOREIGN KEY (KTVFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS103FRMPNR ADD (CONSTRAINT  PFRFLD_TMS100TBS_FK FOREIGN KEY (PFRFLD) REFERENCES TMSYSTEM.TMS100TBS(TBSFNA) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS103FRMPNR ADD (CONSTRAINT  PFRFRM_O1201FORMULAR_FK FOREIGN KEY (PFRFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS115DAN ADD (CONSTRAINT  DANFRM_O1201FORMULAR_FK FOREIGN KEY (DANFRM) REFERENCES TMSYSTEM.O1201FORMULAR(FMRNUM)   );
Alter Table %SCHEMA%.TMS130EZK ADD (CONSTRAINT  EZKAKR_O1001ABRKREIS_FK FOREIGN KEY (EZKAKR) REFERENCES %SCHEMA%.O1001ABRKREIS(AKRNUM)   );
Alter Table %SCHEMA%.TMS130EZK ADD (CONSTRAINT  EZKEZK_TMS130ZKT_FK FOREIGN KEY (EZKEZK) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS130EZK ADD (CONSTRAINT  EZKZKT_TMS130ZKT_FK FOREIGN KEY (EZKZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS130ZKT ADD (CONSTRAINT  ZKTZZ1_TMS130ZKT_FK FOREIGN KEY (ZKTZZ1) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS130ZKT ADD (CONSTRAINT  ZKTZZ2_TMS130ZKT_FK FOREIGN KEY (ZKTZZ2) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS130ZKT ADD (CONSTRAINT  ZKTZZ3_TMS130ZKT_FK FOREIGN KEY (ZKTZZ3) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS130ZKT ADD (CONSTRAINT  ZKTZZ4_TMS130ZKT_FK FOREIGN KEY (ZKTZZ4) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS131FCD ADD (CONSTRAINT  FCDFLG_TMS131FCD_FK FOREIGN KEY (FCDFLG) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.TMS131FCD ADD (CONSTRAINT  FCDZKT_TMS130ZKT_FK FOREIGN KEY (FCDZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS132ERS ADD (CONSTRAINT  TTPERS_TMS132TT2_FK FOREIGN KEY (TTPERS) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS132ERS ADD (CONSTRAINT  TTPNUMERS_TMS132TT2_FK FOREIGN KEY (TTPNUMERS) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS133KA2 ADD (CONSTRAINT  KA2DTM_TMS133BAK_FK FOREIGN KEY (KA2DTM) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS133KA2 ADD (CONSTRAINT  KA2NUM_TMS135MU2_FK FOREIGN KEY (KA2NUM) REFERENCES %SCHEMA%.TMS135MU2(MU2KAL)   );
Alter Table %SCHEMA%.TMS133KA2 ADD (CONSTRAINT  KA2TTP_TMS132TT2_FK FOREIGN KEY (KA2TTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS134FTG ADD (CONSTRAINT  FTGKAL_TMS135MU2_FK FOREIGN KEY (FTGKAL) REFERENCES %SCHEMA%.TMS135MU2(MU2KAL)   );
Alter Table %SCHEMA%.TMS134FTG ADD (CONSTRAINT  FTGTTP_TMS132TT2_FK FOREIGN KEY (FTGTTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS134WTG ADD (CONSTRAINT  WTGFTG_TMS134WTG_FK FOREIGN KEY (WTGFTG) REFERENCES %SCHEMA%.TMS134WFT(WFTFTG) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS136ATG ADD (CONSTRAINT  ATGNUM_TMS135MU2_FK FOREIGN KEY (ATGNUM) REFERENCES %SCHEMA%.TMS135MU2(MU2KAL)   );
Alter Table %SCHEMA%.TMS136ATG ADD (CONSTRAINT  ATGTTP_TMS132TT2_FK FOREIGN KEY (ATGTTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS137WCH ADD (CONSTRAINT  WCHKAL_TMS135MU2_FK FOREIGN KEY (WCHKAL) REFERENCES %SCHEMA%.TMS135MU2(MU2KAL)   );
Alter Table %SCHEMA%.TMS137WCH ADD (CONSTRAINT  WCHTTP_TMS132TT2_FK FOREIGN KEY (WCHTTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS140AZV ADD (CONSTRAINT  AZVNUM_TMS140AZT_FK FOREIGN KEY (AZVNUM) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS140AZV ADD (CONSTRAINT  AZVAZP_TMS141AZP_FK FOREIGN KEY (AZVAZP) REFERENCES %SCHEMA%.TMS141AZP(AZPNUM)   );
Alter Table %SCHEMA%.TMS140AZV ADD (CONSTRAINT  AZVPSM_TMS142PSM_FK FOREIGN KEY (AZVPSM) REFERENCES %SCHEMA%.TMS142PSM(PSMNUM)   );
Alter Table %SCHEMA%.TMS141AZP ADD (CONSTRAINT  TMS130ZKT_AZPZMT_FK FOREIGN KEY (AZPZMT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS143PSE ADD (CONSTRAINT  PSENUM_TMS142PSM_FK FOREIGN KEY (PSENUM) REFERENCES %SCHEMA%.TMS142PSM(PSMNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS150BSD ADD (CONSTRAINT  BSDAMP_TMS130ZKT_FK FOREIGN KEY (BSDAMP) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BSD ADD (CONSTRAINT  BSDZKN_TMS130ZKT_FK FOREIGN KEY (BSDZKN) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BSD ADD (CONSTRAINT  BSDZKT_TMS130ZKT_FK FOREIGN KEY (BSDZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1NUM_TMS150BSD_FK FOREIGN KEY (BS1NUM) REFERENCES %SCHEMA%.TMS150BSD(BSDNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1TTP_TMS132TT2_FK FOREIGN KEY (BS1TTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1ZKM_TMS130ZKT_FK FOREIGN KEY (BS1ZKM) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1ZKT_TMS130ZKT_FK FOREIGN KEY (BS1ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1ZKZ_TMS130ZKT_FK FOREIGN KEY (BS1ZKZ) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1ZSM_TMS152ZSB_FK FOREIGN KEY (BS1ZSM) REFERENCES %SCHEMA%.TMS152ZSB(ZSBNUM)   );
Alter Table %SCHEMA%.TMS150BS1 ADD (CONSTRAINT  BS1ZSN_TMS152ZSB_FK FOREIGN KEY (BS1ZSN) REFERENCES %SCHEMA%.TMS152ZSB(ZSBNUM)   );
Alter Table %SCHEMA%.TMS150BS2 ADD (CONSTRAINT  BS2NUM_TMS150BSD_FK FOREIGN KEY (BS2NUM) REFERENCES %SCHEMA%.TMS150BSD(BSDNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS150BS2 ADD (CONSTRAINT  BS2ZKM_TMS130ZKT_FK FOREIGN KEY (BS2ZKM) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS2 ADD (CONSTRAINT  BS2ZKT_TMS130ZKT_FK FOREIGN KEY (BS2ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS150BS2 ADD (CONSTRAINT  BS2ZKZ_TMS130ZKT_FK FOREIGN KEY (BS2ZKZ) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS151VR1 ADD (CONSTRAINT  VR1NUM_TMS151VRA_FK FOREIGN KEY (VR1NUM) REFERENCES %SCHEMA%.TMS151VRA(VRANUM)   );
Alter Table %SCHEMA%.TMS151VR1 ADD (CONSTRAINT  VR1TTP_TMS132TT2_FK FOREIGN KEY (VR1TTP) REFERENCES %SCHEMA%.TMS132TT2(TT2NUM)   );
Alter Table %SCHEMA%.TMS151VR1 ADD (CONSTRAINT  VR1FC1_TMS131FCD_FK FOREIGN KEY (VR1FC1) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.TMS151VR1 ADD (CONSTRAINT  VR1FC2_TMS131FCD_FK FOREIGN KEY (VR1FC2) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1MKT_TMS130ZKT_FK FOREIGN KEY (ZS1MKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1MZK_TMS130ZKT_FK FOREIGN KEY (ZS1MZK) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1NUM_TMS152ZSB_FK FOREIGN KEY (ZS1NUM) REFERENCES %SCHEMA%.TMS152ZSB(ZSBNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1ZK2_TMS130ZKT_FK FOREIGN KEY (ZS1ZK2) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1ZK3_TMS130ZKT_FK FOREIGN KEY (ZS1ZK3) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1ZK4_TMS130ZKT_FK FOREIGN KEY (ZS1ZK4) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS152ZS1 ADD (CONSTRAINT  ZS1ZKT_TMS130ZKT_FK FOREIGN KEY (ZS1ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS153SA1 ADD (CONSTRAINT  SA1NUM_TMS153SAL_FK FOREIGN KEY (SA1NUM) REFERENCES %SCHEMA%.TMS153SAL(SALNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS153SA1 ADD (CONSTRAINT  SA1ZKT_TMS130ZKT_FK FOREIGN KEY (SA1ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS153SA1 ADD (CONSTRAINT  SA1KMN_TMS130ZKT_FK FOREIGN KEY (SA1KMN) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS153SA1 ADD (CONSTRAINT  SA1KMX_TMS130ZKT_FK FOREIGN KEY (SA1KMX) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS153SA1 ADD (CONSTRAINT  SA1ZKB_TMS130ZKT_FK FOREIGN KEY (SA1ZKB) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS154LFZ ADD (CONSTRAINT  LFZFCD_TMS131FCD_FK FOREIGN KEY (LFZFCD) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.TMS155SF1 ADD (CONSTRAINT  SF1NUM_TMS155SFR_FK FOREIGN KEY (SF1NUM) REFERENCES %SCHEMA%.TMS155SFR(SFRMOD) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS155SF1 ADD (CONSTRAINT  SF1AZT_TMS140AZT_FK FOREIGN KEY (SF1AZT) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM)   );
Alter Table %SCHEMA%.TMS155SU1 ADD (CONSTRAINT  SU1NAM_TMS155SUR_FK FOREIGN KEY (SU1NAM) REFERENCES %SCHEMA%.TMS155SUR(SURNAM)   );
Alter Table %SCHEMA%.TMS155SU2 ADD (CONSTRAINT  SU2NAM_TMS155SUR_FK FOREIGN KEY (SU2NAM) REFERENCES %SCHEMA%.TMS155SUR(SURNAM)   );
Alter Table %SCHEMA%.TMS155SU2 ADD (CONSTRAINT  SU2ZK2_TMS130ZKT_FK FOREIGN KEY (SU2ZK2) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS155SU2 ADD (CONSTRAINT  SU2ZK3_TMS130ZKT_FK FOREIGN KEY (SU2ZK3) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS155SU2 ADD (CONSTRAINT  SU2ZK4_TMS130ZKT_FK FOREIGN KEY (SU2ZK4) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS155SU2 ADD (CONSTRAINT  SU2ZKT_TMS130ZKT_FK FOREIGN KEY (SU2ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS157BM1 ADD (CONSTRAINT  BM1NUM_TMS157BMD_FK FOREIGN KEY (BM1NUM) REFERENCES %SCHEMA%.TMS157BMD(BMDNUM)   );
Alter Table %SCHEMA%.TMS157BM1 ADD (CONSTRAINT  BM1ZKE_TMS130ZKT_FK FOREIGN KEY (BM1ZKE) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS157BM1 ADD (CONSTRAINT  BM1ZKT_TMS130ZKT_FK FOREIGN KEY (BM1ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS161WPL ADD (CONSTRAINT  WPLBSD_TMS150BSD_FL FOREIGN KEY (WPLBSD) REFERENCES %SCHEMA%.TMS150BSD(BSDNUM)   );
Alter Table %SCHEMA%.TMS161WPL ADD (CONSTRAINT  WPLVRA_TMS151VRA_FK FOREIGN KEY (WPLVRA) REFERENCES %SCHEMA%.TMS151VRA(VRANUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS161WPL ADD (CONSTRAINT  WPLAGR_TMS160AGR_FK FOREIGN KEY (WPLAGR) REFERENCES %SCHEMA%.TMS160AGR(AGRNUM)   );
Alter Table %SCHEMA%.TMS161WPL ADD (CONSTRAINT  WPLAZT_TMS140AZT_FK FOREIGN KEY (WPLAZT) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS162ERS ADD (CONSTRAINT  ERSAGR_TMS162ERS_FK FOREIGN KEY (ERSAGR) REFERENCES %SCHEMA%.TMS160AGR(AGRNUM)   );
Alter Table %SCHEMA%.TMS162ERS ADD (CONSTRAINT  ERSAZT_TMS140AZT_FK FOREIGN KEY (ERSAZT) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS162ERS ADD (CONSTRAINT  ERSBSD_TMS150BSD_FL FOREIGN KEY (ERSBSD) REFERENCES %SCHEMA%.TMS150BSD(BSDNUM)   );
Alter Table %SCHEMA%.TMS162ERS ADD (CONSTRAINT  ERSAZE_TMS140AZT_FK FOREIGN KEY (ERSAZE) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM)   );
Alter Table %SCHEMA%.TMS162ERS ADD (CONSTRAINT  ERSVRA_TMS151VRA_FK FOREIGN KEY (ERSVRA) REFERENCES %SCHEMA%.TMS151VRA(VRANUM)   );
Alter Table %SCHEMA%.TMS170LG1 ADD (CONSTRAINT  LG1NUM_TMS170LGP_FK FOREIGN KEY (LG1NUM) REFERENCES %SCHEMA%.TMS170LGP(LGPNUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS171LUG ADD (CONSTRAINT  LUGLGP_TMS170LGP_FK FOREIGN KEY (LUGLGP) REFERENCES %SCHEMA%.TMS170LGP(LGPNUM)   );
Alter Table %SCHEMA%.TMS171LU1 ADD (CONSTRAINT  LU1NUM_TMS171LUG_FK FOREIGN KEY (LU1NUM) REFERENCES %SCHEMA%.TMS171LUG(LUGLUG)   );
Alter Table %SCHEMA%.TMS171LU1 ADD (CONSTRAINT  LU1ZTK_TMS130ZKT_FK FOREIGN KEY (LU1ZTK) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS300PKT ADD (CONSTRAINT  PKTPNR_TMS329ZTG_FK FOREIGN KEY (PKTPNR,PKTDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS300PNR ADD (CONSTRAINT  PNRFRE_O1301FRMRECHT_FK FOREIGN KEY (PNRFRE) REFERENCES %SCHEMA%.O1301FRMRECHT(FRENUM)   );
Alter Table %SCHEMA%.TMS300PNR ADD (CONSTRAINT  PNRFRT_O1501FCDRECHT_FK FOREIGN KEY (PNRFRT) REFERENCES %SCHEMA%.O1501FCDRECHT(FRTNUM)   );
Alter Table %SCHEMA%.TMS300PNR ADD (CONSTRAINT  PNRMRT_O1401MENRECHT_FK FOREIGN KEY (PNRMRT) REFERENCES %SCHEMA%.O1401MENRECHT(MRTNUM)   );
Alter Table %SCHEMA%.TMS300PNR ADD (CONSTRAINT  PNRSRT_O1802SCHALTRTE_FK FOREIGN KEY (PNRSRT) REFERENCES %SCHEMA%.O1802SCHALTRTE(SRTNUM)   );
Alter Table %SCHEMA%.TMS303SBE ADD (CONSTRAINT  SBEFRE_O1301FRMRECHT_FK FOREIGN KEY (SBEFRE) REFERENCES %SCHEMA%.O1301FRMRECHT(FRENUM)   );
Alter Table %SCHEMA%.TMS303SBE ADD (CONSTRAINT  SBEFRT_O1501FCDRECHT_FK FOREIGN KEY (SBEFRT) REFERENCES %SCHEMA%.O1501FCDRECHT(FRTNUM)   );
Alter Table %SCHEMA%.TMS303SBE ADD (CONSTRAINT  SBEMRT_O1401MENRECHT_FK FOREIGN KEY (SBEMRT) REFERENCES %SCHEMA%.O1401MENRECHT(MRTNUM)   );
Alter Table %SCHEMA%.TMS303SBE ADD (CONSTRAINT  SBEPRT_O1602PREKOPF_FK FOREIGN KEY (SBEPRT) REFERENCES %SCHEMA%.O1602PREKOPF(PRKNUM)   );
Alter Table %SCHEMA%.TMS303SBE ADD (CONSTRAINT  SBESRT_O1802SCHALTRTE_FK FOREIGN KEY (SBESRT) REFERENCES %SCHEMA%.O1802SCHALTRTE(SRTNUM)   );
Alter Table %SCHEMA%.TMS310BSV ADD (CONSTRAINT  BSVLFZ_TMS154LFZ_FK FOREIGN KEY (BSVLFZ) REFERENCES %SCHEMA%.TMS154LFZ(LFZNUM)   );
Alter Table %SCHEMA%.TMS310BSV ADD (CONSTRAINT  BSVSUL_TMS155SUR_FK FOREIGN KEY (BSVSUL) REFERENCES %SCHEMA%.TMS155SUR(SURNAM)   );
Alter Table %SCHEMA%.TMS310BSV ADD (CONSTRAINT  BSVSAL_TMS153SAL_FK FOREIGN KEY (BSVSAL) REFERENCES %SCHEMA%.TMS153SAL(SALNUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS310BSV ADD (CONSTRAINT  BSVSFR_TMS155SFR_FK FOREIGN KEY (BSVSFR) REFERENCES %SCHEMA%.TMS155SFR(SFRMOD) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS310BSV ADD (CONSTRAINT  BSVURL_TMS155URL_FK FOREIGN KEY (BSVURL) REFERENCES %SCHEMA%.TMS155URL(URLNUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS311ZUO ADD (CONSTRAINT  ZUOAGR_TMS160AGR_FK FOREIGN KEY (ZUOAGR) REFERENCES %SCHEMA%.TMS160AGR(AGRNUM)   );
Alter Table %SCHEMA%.TMS311ZUO ADD (CONSTRAINT  ZUOKRT_O1005KSTART_FK FOREIGN KEY (ZUOKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.TMS311ZUO ADD (CONSTRAINT  ZUOKST_O1003KSTSTELLE_FK FOREIGN KEY (ZUOKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS311ZUO ADD (CONSTRAINT  ZUOKTR_O1004KSTTRAEGER_FK FOREIGN KEY (ZUOKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.TMS311ZUO ADD (CONSTRAINT  ZUOVRA_TMS151VRA_FK FOREIGN KEY (ZUOVRA) REFERENCES %SCHEMA%.TMS151VRA(VRANUM)   );
Alter Table %SCHEMA%.TMS312KSV ADD (CONSTRAINT  KSVGB_TMS133BAK_FK FOREIGN KEY (KSVGBI) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS312KSV ADD (CONSTRAINT  KSVKST_O1003KSTSTELLE_FK FOREIGN KEY (KSVKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS320LBR ADD (CONSTRAINT  LBRPNR_TMS329ZTG_FK FOREIGN KEY (LBRPNR,LBRDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS320LB3 ADD (CONSTRAINT  LB3PNR_TMS329ZTG_FK FOREIGN KEY (LB3PNR,LB3DTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS320SVT ADD (CONSTRAINT  SVTPNR_TMS329ZTG_FK FOREIGN KEY (SVTPNR,SVTDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS320SV2 ADD (CONSTRAINT  SV2PNR_TMS329ZTG_FK FOREIGN KEY (SV2PNR,SV2DTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS320TGB ADD (CONSTRAINT  TGBDTM_TMS133BAK_FK FOREIGN KEY (TGBDTM) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS320TGB ADD (CONSTRAINT  TGBPNR_TMS329ZTG_FK FOREIGN KEY (TGBPNR,TGBDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHABT_O1002ABTEILUNG_FK FOREIGN KEY (BCHABT) REFERENCES %SCHEMA%.O1002ABTEILUNG(ABTNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHFCD_TMS131FCD_FK FOREIGN KEY (BCHFCD) REFERENCES %SCHEMA%.TMS131FCD(FCDNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHTXT_TMS321BEM_FK FOREIGN KEY (BCHTXT) REFERENCES %SCHEMA%.TMS321BEM(BEMNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHVON_TMS133BAK_FK FOREIGN KEY (BCHVON) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BSHKST_O1003KSTSTELLE_FK FOREIGN KEY (BCHKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHAZT_TMS140AZT_FK FOREIGN KEY (BCHAZT) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHKRT_O1005KSTART_FK FOREIGN KEY (BCHKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHKTR_O1004KSTTRAEGER_FK FOREIGN KEY (BCHKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.TMS321BCH ADD (CONSTRAINT  BCHVRA_TMS151VRA_FK FOREIGN KEY (BCHVRA) REFERENCES %SCHEMA%.TMS151VRA(VRANUM)   );
Alter Table %SCHEMA%.TMS321KTK ADD (CONSTRAINT  KTKTXT_TMS321BEM_FK FOREIGN KEY (KTKTXT) REFERENCES %SCHEMA%.TMS321BEM(BEMNUM)   );
Alter Table %SCHEMA%.TMS321KTK ADD (CONSTRAINT  KTKVON_TMS133BAK_FK FOREIGN KEY (KTKVON) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS321KTK ADD (CONSTRAINT  KTKZKN_TMS130ZKT_FK FOREIGN KEY (KTKZKN) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS321KTK ADD (CONSTRAINT  KTKZKT_TMS130ZKT_FK FOREIGN KEY (KTKZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS321UZG ADD (CONSTRAINT  UZGPNR_TMS329ZTG_FK FOREIGN KEY (UZGPNR,UZGVON) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS321UZG ADD (CONSTRAINT  UZGTX2_TMS321BEM_FK FOREIGN KEY (UZGTX2) REFERENCES %SCHEMA%.TMS321BEM(BEMNUM)   );
Alter Table %SCHEMA%.TMS321UZG ADD (CONSTRAINT  UZGTXT_TMS321BEM_FK FOREIGN KEY (UZGTXT) REFERENCES %SCHEMA%.TMS321BEM(BEMNUM)   );
Alter Table %SCHEMA%.TMS321UZG ADD (CONSTRAINT  UZGVON_TMS133BAK_FK FOREIGN KEY (UZGVON) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS322GAZ ADD (CONSTRAINT  GAZDTM_TMS300PNR_FK FOREIGN KEY (GAZDTM) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS323GPS ADD (CONSTRAINT  GPSDTM_TMS133BAK_FK FOREIGN KEY (GPSDTM) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS327TAG ADD (CONSTRAINT  TAGPNR_TMS329ZTG_FK FOREIGN KEY (TAGPNR,TAGTAG) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS328BUP ADD (CONSTRAINT  BUPVON_TMS133BAK_FK FOREIGN KEY (BUPVON) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGAGR_TMS160AGR_FK FOREIGN KEY (ZTGAGR) REFERENCES %SCHEMA%.TMS160AGR(AGRNUM)   );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGAZT_TMS140AZT_FK FOREIGN KEY (ZTGAZT) REFERENCES %SCHEMA%.TMS140AZT(AZTNUM) ON DELETE SET NULL );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGKRT_O1005KSTART_FK FOREIGN KEY (ZTGKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGKST_O1003KSTSTELLE_FK FOREIGN KEY (ZTGKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGKTR_O1004KSTTRAEGER_FK FOREIGN KEY (ZTGKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.TMS329ZTG ADD (CONSTRAINT  ZTGVRA_TMS151VRA_FK FOREIGN KEY (ZTGVRA) REFERENCES %SCHEMA%.TMS151VRA(VRANUM)   );
Alter Table %SCHEMA%.TMS330ABR ADD (CONSTRAINT  ABRAKR_O1001ABRKREIS_FK FOREIGN KEY (ABRAKR) REFERENCES %SCHEMA%.O1001ABRKREIS(AKRNUM)   );
Alter Table %SCHEMA%.TMS330ABR ADD (CONSTRAINT  ABRBIS_TMS133BAK_FK FOREIGN KEY (ABRBIS) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS331ZKA ADD (CONSTRAINT  ZKAKST_O1003KSTSTELLE_FK FOREIGN KEY (ZKAKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS331ZKB ADD (CONSTRAINT  ZKBDTM_TMS133BAK_FK FOREIGN KEY (ZKBDTM) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS331ZKB ADD (CONSTRAINT  ZKBKRT_O1005KSTART_FK FOREIGN KEY (ZKBKRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.TMS331ZKB ADD (CONSTRAINT  ZKBKST_O1003KSTSTELLE_FK FOREIGN KEY (ZKBKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS331ZKB ADD (CONSTRAINT  ZKBKTR_O1004KSTTRAEGER_FK FOREIGN KEY (ZKBKTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.TMS331ZKB ADD (CONSTRAINT  ZKBZKT_TMS130ZKT_FK FOREIGN KEY (ZKBZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS331ZKN ADD (CONSTRAINT  ZKNPNR_TMS329ZTG_FK FOREIGN KEY (ZKNPNR,ZKNDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS331ZKW ADD (CONSTRAINT  ZKWPNR_TMS329ZTG_FK FOREIGN KEY (ZKWPNR,ZKWDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1ABR_TMS330ABR_FK FOREIGN KEY (ZK1ABR) REFERENCES %SCHEMA%.TMS330ABR(ABRNUM)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1BDT_TMS133BAK_FK FOREIGN KEY (ZK1BDT) REFERENCES TMSYSTEM.TMS133BAK(BAKDTM)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1KRT_O1005KSTART_FK FOREIGN KEY (ZK1KRT) REFERENCES %SCHEMA%.O1005KSTART(KRTNUM)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1KST_O1003KSTSTELLE_FK FOREIGN KEY (ZK1KST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1KTR_O1004KSTTRAEGER_FK FOREIGN KEY (ZK1KTR) REFERENCES %SCHEMA%.O1004KSTTRAEGER(KTRNUM)   );
Alter Table %SCHEMA%.TMS331ZK1 ADD (CONSTRAINT  ZK1ZKT_TMS130ZKT_FK FOREIGN KEY (ZK1ZKT) REFERENCES %SCHEMA%.TMS130ZKT(ZKTNUM)   );
Alter Table %SCHEMA%.TMS332FTG ADD (CONSTRAINT  FTGPNR_TMS329ZTG_FK FOREIGN KEY (FTGPNR,FTGDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS332JAV ADD (CONSTRAINT  JAVPNR_TMS300PNR_FK FOREIGN KEY (JAVPNR) REFERENCES %SCHEMA%.TMS300PNR(PNRNUM)   );
Alter Table %SCHEMA%.TMS332SUL ADD (CONSTRAINT  SULPNR_TMS3329ZTG_FK FOREIGN KEY (SULPNR,SULDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS332SUV ADD (CONSTRAINT  SUVPNR_TMS300PNR_FK FOREIGN KEY (SUVPNR) REFERENCES %SCHEMA%.TMS300PNR(PNRNUM)   );
Alter Table %SCHEMA%.TMS332UTG ADD (CONSTRAINT  UTGPNR_TMS329ZTG_FK FOREIGN KEY (UTGPNR,UTGDTM) REFERENCES %SCHEMA%.TMS329ZTG(ZTGPNR,ZTGVON)   );
Alter Table %SCHEMA%.TMS501APK ADD (CONSTRAINT  APKFBE_TMS559FBE_FK FOREIGN KEY (APKFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS501APK ADD (CONSTRAINT  APKKST_O1003KSTSTELLE_FK FOREIGN KEY (APKKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS501APK ADD (CONSTRAINT  APKMEE_TMS558MEE_FK FOREIGN KEY (APKMEE) REFERENCES %SCHEMA%.TMS558MEE(MEEMEE)   );
Alter Table %SCHEMA%.TMS504APP ADD (CONSTRAINT  APPAPG_TMS530APG_FK FOREIGN KEY (APPAPG) REFERENCES %SCHEMA%.TMS530APG(APGAPG)   );
Alter Table %SCHEMA%.TMS504APP ADD (CONSTRAINT  APPAPK_TMS501APK_FK FOREIGN KEY (APPAPK) REFERENCES %SCHEMA%.TMS501APK(APKAPK)   );
Alter Table %SCHEMA%.TMS504APP ADD (CONSTRAINT  APPFBE_TMS559FBE_FK FOREIGN KEY (APPFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS504APP ADD (CONSTRAINT  APPMEE_TMS558MEE_FK FOREIGN KEY (APPMEE) REFERENCES %SCHEMA%.TMS558MEE(MEEMEE)   );
Alter Table %SCHEMA%.TMS520ASG ADD (CONSTRAINT  ASGFBE_TMS559FBE_FK FOREIGN KEY (ASGFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS521UBG ADD (CONSTRAINT  UBGFBE_TMS559FBE_FK FOREIGN KEY (UBGFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS530APG ADD (CONSTRAINT  APGFBE_TMS559FBE_FK FOREIGN KEY (APGFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS531APL ADD (CONSTRAINT  APLAPG_TMS530APG_FK FOREIGN KEY (APLAPG) REFERENCES %SCHEMA%.TMS530APG(APGAPG)   );
Alter Table %SCHEMA%.TMS531APL ADD (CONSTRAINT  APLFBE_TMS559FBE_FK FOREIGN KEY (APLFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS531APL ADD (CONSTRAINT  APLUBG_TMS521UBG_FK FOREIGN KEY (APLUBG) REFERENCES %SCHEMA%.TMS521UBG(UBGUBG)   );
Alter Table %SCHEMA%.TMS533EMO ADD (CONSTRAINT  EMOPMO_TMS534PMO_FK FOREIGN KEY (EMOPMO) REFERENCES %SCHEMA%.TMS534PMO(PMOPMO)   );
Alter Table %SCHEMA%.TMS536PMZ ADD (CONSTRAINT  PMZPMO_TMS534PMO_FK FOREIGN KEY (PMZPMO) REFERENCES %SCHEMA%.TMS534PMO(PMOPMO)   );
Alter Table %SCHEMA%.TMS536PMZ ADD (CONSTRAINT  PMZPMS_TMS535PMS_FK FOREIGN KEY (PMZPMS) REFERENCES %SCHEMA%.TMS535PMS(PMSNUM)   );
Alter Table %SCHEMA%.TMS537KSG ADD (CONSTRAINT  TMS537KSG_O1003KSTSTELLE_FK FOREIGN KEY (KSGKST) REFERENCES %SCHEMA%.O1003KSTSTELLE(KSTNUM)   );
Alter Table %SCHEMA%.TMS537KSG ADD (CONSTRAINT  TMS537KSG_TMS530APG_FK FOREIGN KEY (KSGAPG) REFERENCES %SCHEMA%.TMS530APG(APGAPG)   );
Alter Table %SCHEMA%.TMS537KSG ADD (CONSTRAINT  TMS537KSG_TMS559FBE_FK FOREIGN KEY (KSGFBE) REFERENCES %SCHEMA%.TMS559FBE(FBEFBE)   );
Alter Table %SCHEMA%.TMS601KGR ADD (CONSTRAINT  KGRNUM_TMS600KNT_FK FOREIGN KEY (KGRKNT) REFERENCES %SCHEMA%.TMS600KNT(KNTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS601KGR ADD (CONSTRAINT  KGRNUM_TMS601KBZ_FK FOREIGN KEY (KGRNUM) REFERENCES %SCHEMA%.TMS601KBZ(KBZNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS604ARP ADD (CONSTRAINT  ARPNUM_TMS604ARP_FK FOREIGN KEY (ARPVWS) REFERENCES %SCHEMA%.TMS604ARP(ARPNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS604AUS ADD (CONSTRAINT  AUSARP_TMS604ARP_FK FOREIGN KEY (AUSARP) REFERENCES %SCHEMA%.TMS604ARP(ARPNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS604KAP ADD (CONSTRAINT  KAPARP_TMS601KBZ_FK FOREIGN KEY (KAPKGR) REFERENCES %SCHEMA%.TMS601KBZ(KBZNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS604KAP ADD (CONSTRAINT  TMS604KAP_TMS604ARP_FK FOREIGN KEY (KAPARP) REFERENCES %SCHEMA%.TMS604ARP(ARPNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS607APM ADD (CONSTRAINT  APMPNR_TMS604ARP_FK FOREIGN KEY (APMARP) REFERENCES %SCHEMA%.TMS604ARP(ARPNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS608KZM ADD (CONSTRAINT  KZMPNR_TMS601KBZ_FK FOREIGN KEY (KZMKGR) REFERENCES %SCHEMA%.TMS601KBZ(KBZNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS611MAB ADD (CONSTRAINT  MABABW_TMS611ABW_FK FOREIGN KEY (MABABW) REFERENCES %SCHEMA%.TMS611ABW(ABWNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS612MNA ADD (CONSTRAINT  MNANAT_TMS612NAT_FK FOREIGN KEY (MNANAT) REFERENCES %SCHEMA%.TMS612NAT(NATNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS613MZF ADD (CONSTRAINT  MZFZFT_TMS613ZFT_FK FOREIGN KEY (MZFZFT) REFERENCES %SCHEMA%.TMS613ZFT(ZFTNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS653VPS ADD (CONSTRAINT  VPSLND_TMS651LND_FK FOREIGN KEY (VPSLND) REFERENCES %SCHEMA%.TMS651LND(LNDNUM) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS670PT1 ADD (CONSTRAINT  PT1NAM_TMS670PTP_FK FOREIGN KEY (PT1NAM) REFERENCES %SCHEMA%.TMS670PTP(PTPNAM)   );
Alter Table %SCHEMA%.TMS705ESO ADD (CONSTRAINT  ESOPLG_TMS701PLG_FK FOREIGN KEY (ESOPLG) REFERENCES %SCHEMA%.TMS701PLG(PLGPLG)   );
Alter Table %SCHEMA%.TMS710PBV ADD (CONSTRAINT  PBVESA_TMS703ESA_FK FOREIGN KEY (PBVESA) REFERENCES %SCHEMA%.TMS703ESA(ESAESA)   );
Alter Table %SCHEMA%.TMS710PBV ADD (CONSTRAINT  PBVESO_TMS705ESO_FK FOREIGN KEY (PBVESO) REFERENCES %SCHEMA%.TMS705ESO(ESOESO)   );
Alter Table %SCHEMA%.TMS711PEO ADD (CONSTRAINT  PEOESO_TMS705ESO_FK FOREIGN KEY (PEOESO) REFERENCES %SCHEMA%.TMS705ESO(ESOESO)   );
Alter Table %SCHEMA%.TMS712PGZ ADD (CONSTRAINT  PGZESA_TMS703ESA_FK FOREIGN KEY (PGZESA) REFERENCES %SCHEMA%.TMS703ESA(ESAESA)   );
Alter Table %SCHEMA%.TMS712PGZ ADD (CONSTRAINT  PGZESO_TMS705ESO_FK FOREIGN KEY (PGZESO) REFERENCES %SCHEMA%.TMS705ESO(ESOESO)   );
Alter Table %SCHEMA%.TMS712PGZ ADD (CONSTRAINT  PGZPLG_TMS701PLG_FK FOREIGN KEY (PGZPLG) REFERENCES %SCHEMA%.TMS701PLG(PLGPLG)   );
Alter Table %SCHEMA%.TMS716QZP ADD (CONSTRAINT  QZPQFK_TMS707QFK_FK FOREIGN KEY (QZPQFK) REFERENCES %SCHEMA%.TMS707QFK(QFKQFK)   );
Alter Table %SCHEMA%.TMS717QEA ADD (CONSTRAINT  QEAQFK_TMS707QFK_FK FOREIGN KEY (QEAQFK) REFERENCES %SCHEMA%.TMS707QFK(QFKQFK)   );
Alter Table %SCHEMA%.TMS719PGI ADD (CONSTRAINT  PGINUM_TMS709IDK_FK FOREIGN KEY (PGINUM) REFERENCES %SCHEMA%.TMS709IDK(IDKNUM)   );
Alter Table %SCHEMA%.TMS719PGI ADD (CONSTRAINT  PGIPLG_TMS701PLG_FK FOREIGN KEY (PGIPLG) REFERENCES %SCHEMA%.TMS701PLG(PLGPLG)   );
Alter Table %SCHEMA%.TMS720BSS ADD (CONSTRAINT  BSSPLG_TMS712PGZ_FK FOREIGN KEY (BSSPLG,BSSESO,BSSESA) REFERENCES %SCHEMA%.TMS712PGZ(PGZPLG,PGZESO,PGZESA)   );
Alter Table %SCHEMA%.TMS725BSM ADD (CONSTRAINT  BSMESA_TMS703ESA_FK FOREIGN KEY (BSMESA) REFERENCES %SCHEMA%.TMS703ESA(ESAESA)   );
Alter Table %SCHEMA%.TMS725BSM ADD (CONSTRAINT  BSMESO_TMS705ESO_FK FOREIGN KEY (BSMESO) REFERENCES %SCHEMA%.TMS705ESO(ESOESO)   );
Alter Table %SCHEMA%.TMS730BDP ADD (CONSTRAINT  BDPESA_TMS703ESA_FK FOREIGN KEY (BDPESA) REFERENCES %SCHEMA%.TMS703ESA(ESAESA)   );
Alter Table %SCHEMA%.TMS730BDP ADD (CONSTRAINT  BDPESO_TMS705ESO_FK FOREIGN KEY (BDPESO) REFERENCES %SCHEMA%.TMS705ESO(ESOESO)   );
Alter Table %SCHEMA%.TMS736BDS ADD (CONSTRAINT  TMS736BDS_TMS720BSS_FK FOREIGN KEY (BDSPLG,BDSESO,BDSESA,BDSTTP,BDSVON,BDSASW) REFERENCES %SCHEMA%.TMS720BSS(BSSPLG,BSSESO,BSSESA,BSSTTP,BSSVON,BSSASW) ON DELETE CASCADE );
Alter Table %SCHEMA%.TMS746ERR ADD (CONSTRAINT  ERRPLG_TMS701PLG_FK FOREIGN KEY (ERRPLG) REFERENCES %SCHEMA%.TMS701PLG(PLGPLG)   );
