I am frequently testing certain areas on a development server and so running a pre-defined SQL statement to truncate the tables in question before testing again. It would only be a slip of a key to switch to the live server. I'm looking for an IF statement or similar to prevent that. Either to check the server name, database name, or even that a certain record in a different table exists before running the query. Any help appreciated
Aucun commentaire:
Enregistrer un commentaire