Store in temp table then use data?

Here is the query:

SELECT p.id
    FROM   test.`geoname_mx` p, hello.oc_t_city l
    WHERE  l.s_slug NOT LIKE CONCAT('%',p.asciiname,'%')
	and
	p.`feature code` not in ('ADM1', 'ADM1H', 'ADM2', 'ADM2H', 'ADM3', 'ADM3H', 'ADM4', 'ADM4H', 'ADM5', 'ADMD', 'ADMDH', 'PCLI')

This query generates ID!

How can I store that data in temp table then use it to delete IDS from test.geoname_mx table?

can you explain why you have a massive cross join there?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.