The present invention is directed to a useful compound as aglucokinase activating agent, which is the oxime derivative of theformula [I]:(see formula I)wherein Ring A is aryl or heteroaryl; Q is cycloalkyl, heterocycle, alkylor alkenyl; Ring T is heteroaryl or heterocycle; R1 and R2 areindependently hydrogen atom, halogen atom, cycloalkylsulfonyl or thelike; R3 and R4 are independently hydrogen atom, hydroxy, oxo, halogenatom or the like; R5 is hydrogen atom, halogen atom, cyano, nitro,tetrazolyl or the like; or a pharmaceutically acceptable salt thereof.