The iPhone doesn't store any contacts on the SIM, and can't erase any you had on the SIM from another phone. If you've lost the contacts from the iPhone but still have that SIM with the contacts, you should be able to just import them again:
http://support.apple.com/kb/HT4994
Regards.