Provided is a heterocyclic compound that has an excellent RBP4 reducing effect and is useful as a preventive or therapeutic drug for diseases or symptoms mediated by a rise in RBP4 or by retinol supplied by RBP4. A compound represented by formula (I): Wherein each symbol is as defined in the Description, or a salt of said compound has a superior RBP4-lowering action, and is useful as a medicament for the prophylaxis or treatment of a disease or symptom mediated by an increase in RBP4 or retinol supplied by RBP4.