Search results
3 lis 2014 · To get the name of all tables use: SELECT table_name FROM information_schema.tables; To get the name of the tables from a specific database use: SELECT table_name FROM information_schema.tables WHERE table_schema = 'your_database_name'; Now, to answer the original question, use this query:
12 paź 2010 · select table_name from information_schema.tables where table_type = 'base table' and table_catalog='dbname' For MySQL: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='dbName'
The SELECT statement is used to select data from a database. Example. Return data from the Customers table: SELECT CustomerName, City FROM Customers; Try it Yourself » Syntax. SELECT column1, column2, ... FROM table_name; Here, column1, column2, ... are the field names of the table you want to select data from.
17 maj 2024 · SELECT table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' This query lists all the tables in the current database: Furthermore, we can refine the results by adding additional WHERE clauses, such as filtering tables based on a specific schema.
7 sie 2024 · Use the syntax: SELECT * FROM database_name.INFORMATION_SCHEMA.TABLES where database_name is the name of your database. This will retrieve table information across specified databases. Can I get details about the table schema using this method?
28 gru 2023 · While tools like Azure Data Studio provide easy ways to search by table name, I find it helpful to have a SQL query to hand which I can customize to return additional metadata regarding tables while searching for them.
23 lip 2018 · select table_schema as database_name, table_name. from information_schema.tables. where table_type = 'BASE TABLE' and table_name = 'your table name' order by table_schema, table_name;