A Thai soldier killed at least 20 people inside a mall in the north-eastern province of Nakhon Ratchasima on Saturday before being shot dead by commandos.