如何查看两个相似数据库中一个数据库比另一个数据库多出的表

通过sql语句实现查找出两个数据库中不同的表

 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;

/

猜你喜欢

转载自blog.csdn.net/abc5254065/article/details/89563089