The present invention provides quinazoline compounds which have GPR119 receptor agonistic activity and are useful as medicine, which are compounds of the general formula [I]:wherein R1 is hydrogen or halogen, Ring A is 5- to 6-membered aryl in which the aryl may comprise the same or different 1 to 4 heteroatoms selected from O, S and N, RA1 and RA2 are independently halogen, cyano, etc., Ring B is 6- to 7-membered aliphatic nitrogen-containing heterocycle, RB1 is hydrogen or alkyl, RB2 is hydrogen or hydroxyl, RB3 is hydroxyl, cyano, etc., or pharmaceutically acceptable salts thereof.本發明係提供一種具有GPR119受體激動作用而有用於作為醫藥之下述通式[I]所示之喹唑啉化合物或其藥理上可容許之鹽。通式[I]:[式中,R1表示氫或鹵素,環A表示5至6員芳基環(該芳基環亦可含有從O、S及N中選出之相同或相異之1至4個雜原子),RA1及RA2獨立地表示鹵原子、氰基等,環B表示6至7員脂肪族含氮雜環基,RB1表示氫或烷基,RB2表示氫或羥基,RB3表示羥基、氰基等]。