CREATE TABLE kockazat_felmeroeve
(
   "kockazat_felmeroeve_kod" serial NOT NULL,
   "kockazat_felmeroeve_tkod" int4 NOT NULL,
   "szuloszov" varchar(10),
   "nev" varchar(250),
   "szabvany" varchar(50),
   "szulo" bool DEFAULT false, 
   "c_userid" varchar(20),
    "c_date" date,
    "c_time" varchar(10),
    "m_userid" varchar(20),
    "m_date" date,
    "m_time" varchar(10),
    CONSTRAINT "kockazat_felmeroeve_pk1" PRIMARY KEY ("kockazat_felmeroeve_kod", "kockazat_felmeroeve_tkod"),
   CONSTRAINT kockazat_felmeroeve_fk1 FOREIGN KEY (kockazat_felmeroeve_tkod) REFERENCES kockazat_felmero (kockazat_felmero_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE kockazat_felmeroeve OWNER TO mbt;

CREATE INDEX kockazat_felmeroeve_id1 ON kockazat_felmeroeve (kockazat_felmeroeve_tkod); 