An idealized numerical model is used to explore the generation of mean flows by oscillating wind forcing in a stratified coastal ocean with no alongshore variability, i.e., where neither barotropic nor baroclinic instability is a factor. On the inner shelf, where surface-to-bottom mixing occurs, a mean cross-shelf flow develops, as examined by Castelao et al. (2010), and the present results suggest that this flow can remain two-dimensional if there is a nonzero cross-shelf density gradient. Offshore of the inner shelf, where the water column is stratified, a mean alongshore flow develops in the direction opposite to coastal-trapped wave propagation. This flow is associated with cross-shelf density gradients that are set up by the asymmetry between onshore and offshore flow in the bottom boundary layer. Both forms of rectified flow (cross-shelf and alongshore) are sensitive to the presence of surface heating, and the rectifications can be readily masked by the effect of a steady alongshore wind stress.