No, it's not useful and I just tested it. Here's what I did.
I tried to find a couple of malicious URLs. I ended up picking one to an
exe file from https://malc0de.com/database/ , and one to a
js file that was mentioned in the news not long ago (about an ongoing attack to Magento). Here are the links that show VirusTotal clearly detects those files and their domains: exe file, exe domain, js file, js domain.
Then I found a sample WordPress database on GitHub (an SQL dump), I downloaded it, opened it in a text editor, and then injected the links to the malicious files into the content of a post. I included the links in the post in various ways: as simple text, as HTML links (in href attributes), and as scripts (in the src attribute). Then I uploaded the "infected" SQL dump to VirusTotal, and nothing was detected. I also tried renaming the file as html and exe, but it was still considered to be the same file because it had the same hash, and it was always considered to be plain text. So it looks like VirusTotal doesn't check for malicious URLs in database dumps.
If you have been hacked, the only safe way to clean your database is to restore a clean old copy from your backups. If you really want to check your database anyway, you can't rely on common antivirus software, but you need specific tools and analysis aimed at your specific web application. Changing a simple string or number in your database can be enough to compromise it, for example by changing the numbers that define user permissions, or replacing a simple email address so the attacker can reset a user's password, etc. To be able to spot such changes you need to understand every part of the database. If you search on Google you might be able to find several security services that offer to clean up WordPress sites, including scanning databases. They might check some specific tables, some specific parameters, and look for suspicious domains or strings. I don't know how good and how reliable they are, that of course may vary. As I said, if you really want to be sure to clean up your database, restore it from a clean backup.