A construction machine includes a vertical separating/connecting device
interposed between a lower traveling body and a swing bearing that
supports an upper rotating body. The device includes an externally
toothed ring member fixed to the swing bearing with a first attaching
unit, a rotating unit that rotates the externally toothed ring member, an
internally toothed ring member fixed to the lower traveling body with a
second attaching unit positioned on an attachment pitch circle having the
same diameter and center as an attachment pitch circle of the first
attaching unit, and a fixing unit that fixes the externally toothed ring
member or the internally toothed ring member. Internal teeth of the
internally toothed ring member and external teeth of the externally
toothed ring member are positioned so as to allow the movement of the
external teeth or to engage with each other when the externally toothed
ring member is rotated.