We study the pressure-induced phase transition in the 2H-SiC (wurtzite) using a constant-pressure ab initio technique. A first-order phase transition from the wurtzite structure to a rocksalt structure at 600.0-700.0 GPa is predicted in the constant-pressure simulations. The transformation consists of two successive processes. First, the wurtzite crystal transforms into a fivefold coordinated hexagonal structure with space group P6(3)/mmc due to a compression in the direction of the c axis. Second, the hexagonal phase becomes unstable with respect to shear deformation and converts to first a fivefold coordinated orthorhombic intermediate state within the Cmcm symmetry, and then a rocksalt state. We also study the wurtzite-to-rocksalt and zinc-blende-to-rocksalt phase transformations of SiC from the enthalpy calculations and find that both zinc-blende and wurtzite SiC polytypes show nearly similar equation of state and transforms to a rocksalt structure about 100.0 GPa, in excellent agreement with experiments.