How to get all table names in sql?

1 answer(s)
[]

Yeah, this one depends on what database you're using, mate. Different systems have different ways to do it.

For MySQL, it's super simple. You can just run SHOW TABLES;.

If you're on SQL Server, I reckon you can use SELECT name FROM sys.tables;.

A lot of databases also use the INFORMATION_SCHEMA. So you can query tables from there. It's a good place to look if you're not sure. Cheers.