Compatible query for listing tables

What could be the compatible query alternative for the second one? The first one works, while the second does not.

SHOW TABLES LIKE 'query_%'; #works

and I want to know the alternative working code for:

SHOW TABLES NOT LIKE 'query_%'; #does not work

Thanks.

you should be using the information_schema views instead of the SHOW command

:slight_smile:

Thanks.
I got the list using the below SQL; after reading information schema.


SELECT
	table_name
FROM TABLES
WHERE
	TABLE_SCHEMA='smarty_framework' # the database name
	AND table_type = 'BASE TABLE'
	AND table_name NOT LIKE 'query_%'
;

nice job… pretty quick too

your avatar is well deserved :smiley: