When we delete a category, what happens to the deleted topics in it?

We tested this in an experimental environment. When deleting categories that contain deleted topics, the category_id field in the deleted topics does not change, and the only way to access these topics is to run the SQL query via Data Explorer. So we gave the query a list of valid category IDs and requested topics whose category_id is not in the list.