About 6,190,000 results
Open links in new tab
  1. Get all table names of a particular database by SQL query?

    Oct 12, 2010 · I am working on application which can deal with multiple database servers like "MySQL" and "MS SQL Server". I want to get tables' names of a particular database using a general query which should suitable for all database types. I have tried following: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'

  2. sql - Search of table names - Stack Overflow

    Apr 15, 2021 · If you want to look in all tables in all Databases server-wide and get output you can make use of the undocumented sp_MSforeachdb procedure: sp_MSforeachdb 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%Table_Names%''' You can also use the Filter button to filter tables with a certain string in it.

  3. Find all tables containing column with specified name

    To find all tables containing a column with a specified name in MS SQL Server, you can query the system catalog views. Specifically, you can query the sys.tables and sys.columns views. Here's an example query: SELECT t.name AS table_name FROM sys.tables t JOIN sys.columns c ON t.object_id = c.object_id WHERE c.name = 'column_name';

  4. Retrieve All Table Names From a Specific Database Using SQL

    May 17, 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 …

  5. How to Get the Names of the Table in SQL - GeeksforGeeks

    Dec 19, 2024 · Retrieving table names in SQL Server and MySQL is straightforward using the INFORMATION_SCHEMA.TABLES view. This method allows us to access detailed metadata about the tables and views in our database.

  6. Query to find table names in a SQL Server database

    Dec 28, 2023 · In this article, I will provide a simple SQL query that you can use to search for tables by their name. I’ll also take a quick look at some alternative approaches you can use to obtain the information you need.

  7. How to Find All Table Names in a Database: A Comprehensive Guide (SQL ...

    Oct 26, 2024 · Finding a list of all tables within a database is a common task for database administrators, developers, and data analysts. This guide provides a comprehensive overview of different methods to achieve this, covering SQL queries, Python scripting, and specific examples for various database management systems (DBMS).

  8. Quickly Query the Database: How to Find SQL Statements for All Table Names

    Nov 21, 2024 · To retrieve all table names, you can use the following SQL query: In this query, replace your_database_name with the name of your database. This will return a list of all base tables in the specified schema. If you are using PostgreSQL, you can also access the system catalog to find table names.

  9. SQL Show Tables: List All Tables in a Database

    Jun 2, 2023 · The easiest way to find all tables in SQL is to query the INFORMATION_SCHEMA views. You do this by specifying the information schema, then the “tables” view. Here’s an example. SELECT table_name, table_schema, table_type FROM information_schema.tables ORDER BY table_name ASC;

  10. SQL List All Tables - SQL Tutorial

    Here you can find the respective SQL command to list all tables in MySQL, PostgreSQL, Oracle, SQL Server, DB2, and SQLite. To list all tables in MySQL, first, you connect to the MySQL database server using the following command: Code …

  11. Some results have been removed
Refresh