Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Extract table names from Database

BigBaz's profile image BigBaz posted 2 months ago in Running SQL scripts Permalink

Hi, From MSSQL if I want to get a list of all my table names I use:

SELECT table_name FROM INFORMATION_SCHEMA.TABLES where table_type = 'BASE TABLE' ORDER BY table_name ASC

However, doing this on a Maria databse not only gives me my table names but all 'event', 'file' and a host of other tables that I'm not interested in.

Is there a better SELECT statement for getting just my owned table names?

ansgar's profile image ansgar posted 2 months ago Permalink

You can use the SHOW command on MySQL and/or MariaDB:

SHOW TABLES;
SHOW TABLES FROM mydb;
SHOW TABLE STATUS FROM mydb;
BigBaz's profile image BigBaz posted 2 months ago Permalink

Many thanks. Perfect!

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.