CREATE TABLE hulladek_ht
(
   hulladek_ht_kod serial not null,
   hulladek_ht_hbkod int4 not null,
   nev varchar(60),
   ewc varchar(15),
   osszetevo varchar(20),
   jellemzo varchar(40),
   fizmegforma varchar(20),
   tenyleges varchar(15),
   visszavetelezett varchar(15),
   elokezeles varchar(15),
   begyujtes varchar(15),
   hasznositott varchar(15),
   export varchar(15),
   tenylegesveg varchar(15),
   keletkezett varchar(15),
   "c_userid" varchar(20),
   "c_date" date,
   "c_time" varchar(10),
   "m_userid" varchar(20),
   "m_date" date,
   "m_time" varchar(10),
   CONSTRAINT "hulladek_ht_pk1" PRIMARY KEY ("hulladek_ht_kod"),
   CONSTRAINT hulladek_ht_fk1 FOREIGN KEY (hulladek_ht_hbkod) REFERENCES hulladek_hb (hulladek_hb_kod) ON UPDATE NO ACTION ON DELETE NO ACTION
) WITHOUT OIDS;

ALTER TABLE hulladek_ht OWNER TO mbt;

CREATE INDEX hulladek_ht_id1 ON hulladek_ht (hulladek_ht_hbkod);   
