CREATE TABLE kockazat_ertekelesosztaly
(
   "kockazat_ertekelesosztaly_kod" serial NOT NULL,
   "kockazat_ertekelesosztaly_tkod" int4 NOT NULL,
   "feor" varchar(10),
   "munkakor" varchar(100),
   "letszam" varchar(4),
   "ferfi" varchar(4),
   "nok" varchar(4),
   "osztaly" varchar(1),
   "javaslat" text,
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "kockazat_ertekelesosztaly_pk1" PRIMARY KEY ("kockazat_ertekelesosztaly_kod", "kockazat_ertekelesosztaly_tkod"),
   CONSTRAINT kockazat_ertekelesosztaly_fk1 FOREIGN KEY (kockazat_ertekelesosztaly_tkod) REFERENCES kockazat_ertekeles (kockazat_ertekeles_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE kockazat_ertekelesosztaly OWNER TO mbt;

CREATE INDEX kockazat_ertekelesosztaly_id1 ON kockazat_ertekelesosztaly (kockazat_ertekelesosztaly_tkod);