I have used the below code for create the customer group programmatically, it works well.
But i need that if the same customer group exist it should update the values, instead of creating new one with same name.
$customer_group=Mage::getModel('customer/group');
$customer_group->setCode($typename.'_'.$id);
$customer_group->setTaxClassId(3);
$customer_group->save();
Best Answer
In this approach above, If the group with a certain code exists you will get it in the
$group
variable. If it doesn't exist, you will simply get in$group
an empty instance of the customer group model.