But if I wana have a script that correctly works whenever that I call it, I have to find out if myName already exists and if it does, I drop it by drop rule command, but how can I find out if a rule/default/constraint name already exists?
You might need to give a tad more information, namely the class actions that you are using.
At a guess, you want to make sure username12 hasn't already been taken?
If so... one way is to set the 'username' field in mysql to unique and test the mysql_affected_rows after the insert.
Thanx but I didn't mean that! maybe what I'm asking isn't mySQL and it's just simple sql, but I just wana have the list of all my rules or constraints, those that I defined myself.