The behaviour of vortices induced by a single square cylinder in an oscillating flow was investigated. The flow patterns in the vicinity of square cylinders were visualized using an in-house numerical model. Meanwhile, force coefficients exerted on the square cylinder were determined numerically. In terms of various Keulegan-Carpenter (KC) numbers, it turns out that the flow patterns for an oscillating flow past a single cylinder can be divided into three modes: (i) no vortex, (ii) pairs of symmetric vortices, and (iii) asymmetric vortex shedding. Reynolds (Re) number did not affect the flow field apparently in this study. In addition, the in-line force coefficient decreases exponentially as KC increases. Spectrum analysis of in-line force coefficients for various KCs was provided. It can be found that the flow system was at a periodic state at small KC for the first two modes. Variations of the flow system from a periodic state to a highly nonlinear state in which asymmetric vortex shedding appeared were demonstrated for increasing KC. The relationship between the in-line force and KC was provided for future applications.