How can I delete or undelete topics?

I think you need to end your statement with ;, otherwise it thinks you are trying to write a multi-line query.

Example:

DELETE FROM topic_embeds;