Look at the following query; it will fetch all the tables in your database using the Query.

use ABC --here ABC is database Name

select distinct TABLE_NAME from INFORMATION_SCHEMA .TABLES