mysql批量更改视图归属

/ 0条评论 / 0 个点赞 / 1156人阅读
SELECT
	CONCAT(
		"ALTER DEFINER=`haiguang_user`@`%` VIEW ",
		table_name,
		" AS ",
		view_definition,
		";"
	)
FROM
	information_schema.views
WHERE
	table_schema = 'icms_user_hg';