Been looking for almost an hour now, and i can't believe i haven't figured out how to do this yet. I've found this:
Drop constraints only if it exists in mysql server 5.0
but the link offered there is not enough info to get me there.. Can someone offer an example with code, please?
UPDATE
Sorry i wasn't clear in the original question, but i was hoping for a way to do this in just SQL, not utilizing any application programming.