I have the following query that I run against a postgresql DB whose intent is to return all the tables in a given schema for which the user does NOT have SELECT privileges
select table_name from information_schema.tables
where table_schema=myschema
except
SELECT DISTINCT table_name FROM information_schema.table_privileges
WHERE has_table_privilege(table_schema || '.' || table_name, 'SELECT');
How would I construct a similar query for use against a mysql database? mysql doesn't have a has_table_privilege() function