如題:想要查詢mysql.user
表裡面User='root'
,欄位資訊不包括Host
的資訊
思路如下
首先查詢除所有除
Host
欄位SELECT GROUP_CONCAT( column_name SEPARATOR ',' ) FROM information_schema.COLUMNS WHERE column_name <> 'Host' AND table_name = 'user' AND table_schema = 'mysql'
然後
select
欄位SELECT ( SELECT GROUP_CONCAT( column_name SEPARATOR ',' ) FROM information_schema.COLUMNS WHERE column_name <> 'Host' AND table_name = 'user' AND table_schema = 'mysql' ) FROM mysql.USER WHERE USER = 'root'
這個沒法解決問題,過來請教大佬
本作品採用《CC 協議》,轉載必須註明作者和本文連結