If the data are correlated, which means that the data stored by the second sql depend, are linked in some way with the data which are stored by the first query and/or vice-versa, then you should consider to make a transaction
. In such this way, you could rollback
if one of the queries encounter a problem. You can implement this in a try-catch
statement. If the queries are totally unrelated each-other, you can go with two separate SQL statements.
However I think that, as the data are the same for the two tables, it would be better to do a transaction. So, if you'll have to make operations like joins, deletes, etc. in the future, you have a consistent database yet.