How to view the more tables in one database than the other in two similar databases

Find out different tables in the two databases through SQL statements

 SELECT * FROM
(
	SELECT
		table_name
	FROM
		information_schema. TABLES
	WHERE
		table_schema = 'geologic'
) AS a
LEFT JOIN
 (
     SELECT table_name FROM	information_schema.TABLES WHERE
	table_schema = 'geologic0126'
	) AS b
	ON a.table_name = b.table_name 
	WHERE b.table_name is NULL;

/

Guess you like

Origin blog.csdn.net/abc5254065/article/details/89563089