Need to fulfill request
DELETE FROM directories_data WHERE id=56 But in the directories_data and directories_data_2 table, this id can be used.
SELECT id FROM directories_data WHERE data ILIKE '%id=56%' LIMIT 1; SELECT id FROM directories_data_2 WHERE data ILIKE '%id=56%' LIMIT 1; How to safely delete this entry by checking that it is not found anywhere (2 select query)?