Unsaturated nitrogen heterocyclic compounds of formula (I): (I), as defined in the specification, compositions containing them, and processes for preparing such compounds. Provided herein also are methods of treating disorders or diseases treatable by inhibition of PDE10, such as obesity, Huntington’s Disease, non-insulin dependent diabetes, schizophrenia, bipolar disorder, obsessive-compulsive disorder, and the like.本發明係關於如說明書中定義之式(I)之氮雜環化合物:;含有其之組合物;及製備此等化合物之方法。本文亦提供治療可藉由抑制PDE10而治療之病症或疾病之方法,該等病症或疾病諸如肥胖症、亨廷頓氏病(Huntington's disease)、非胰島素依賴性糖尿病、精神分裂症、躁鬱症(bipolar disorder)、強迫症及其類似病症或疾病。