I have two tables:
- ruleTBL: ruleid hostname
- policyruleTBL: ruleid policyid
In the ruleTBL, the hostname is unique and one hostname may have more than one ruleid. I want to delete all the records in the two tables with one hostname. How should I write the statement?
For example, if these are the records in ruleTBL
(ruleid = 1, hostname = 'news')
(ruleid = 2, hostname = 'news')
and in policyruleTBL:
(ruleid = 1, policyid = 4)
(ruleid = 2, policyid = 5)
I want to delete all the records with one statement. Thank you so much!