IF NOT EXISTS
  (
    SELECT SysColumns.Name 
    FROM SysObjects WITH (NOLOCK) 
      INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
      AND SysColumns.Name = 'NumberOfSubRooms'
      WHERE SysObjects.Name = 'RoomTypes'
  )	
  
    EXECUTE sp_rename 'RoomTypes.NumberOfChildRooms', 'NumberOfSubRooms', 'COLUMN'

GO
