(no subject)

May 23, 2012 15:11

Давно что-то я таких эскуэлек не писал. Мне нравится =)
UPDATE bad_domains INNER JOIN
(SELECT a.id_dom AS id_dom, b.hash AS hash
FROM bad_domains AS a
LEFT JOIN all_domains AS b
ON a.domain = b.domain
WHERE a.owner <> b.hash) OR (a.owner IS NULL AND b.hash IS NOT NULL) OR (a.owner IS NOT NULL AND b.hash IS NULL)) AS owner_diff
SET bad_domains.owner = owner_diff.hash
WHERE bad_domains.id_dom = owner_diff.id_dom;
 Query OK, 2 rows affected (5.97 sec)
Rows matched: 2 Changed: 2 Warnings: 0

меткаобозначающаяотсутствиеметки, что ни день то пост, Технократия

Previous post Next post
Up