CREATE TABLE kockazat_felmerovegyi
(
   "kockazat_felmerovegyi_kod" serial NOT NULL,
   "kockazat_felmerovegyi_tkod" int4 NOT NULL,
    "nev" character varying(200),
    "cas" character varying(20),
    "euszam" character varying(20),
    "veszely" character varying(100),
    "r_mondat" character varying(250),
    "s_mondat" character varying(250),
    "c_userid" varchar(20),
    "c_date" date,
    "c_time" varchar(10),
    "m_userid" varchar(20),
    "m_date" date,
    "m_time" varchar(10),
    CONSTRAINT "kockazat_felmerovegyi_pk1" PRIMARY KEY ("kockazat_felmerovegyi_kod", "kockazat_felmerovegyi_tkod"),
   CONSTRAINT kockazat_felmerovegyi_fk1 FOREIGN KEY (kockazat_felmerovegyi_tkod) REFERENCES kockazat_felmero (kockazat_felmero_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE kockazat_felmerovegyi OWNER TO mbt;

CREATE INDEX kockazat_felmerovegyi_id1 ON kockazat_felmerovegyi (kockazat_felmerovegyi_tkod);