Marek Marek - 4 years ago 126
MySQL Question

Delete URLs with specific domains from MySQL database

I have URLs in column URL. I would like to delete all URLs from database with selected domains. In database are different domains. Do I need to use regex?
For example, I have urls:

I would like to write one SQL expression to delete all URLs that begin with selected domain. Something like this:

DELETE FROM table WHERE url = regex:

Answer Source

In this case, you could use a simple like

 DELETE FROM table WHERE url  liKe ''
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download