SQL table-exists statements replaced