How can display all table name in a Database ?

Total Post:19

Points:133
 237  View(s)
Ratings:
Rate this:

Hi,

I want to know that "how many tables are active in my database" by a single query in SQL server.

  1. Post:31

    Points:219
    Re: How can display all table name in a Database ?

    Hi,

    Rahul Ji,

    I am giving you some database query, I hope that it will help you.

    These are my database and table.

    How can display all table name in a Database ?

    Display All Table name in a Data Base at a time.

    1). SELECT* FROM sys.Tables 

    How can display all table name in a Database ?

    2). SELECT*FROM information_schema.tables

    How can display all table name in a Database ?

    3). sp_tables '%cust%'             --------(search table)

    How can display all table name in a Database ?

    4). SELECT * FROM sys.Tables WHERE name LIKE '%cus%'

    How can display all table name in a Database ?

    5). SELECT * FROM information_schema.tables WHERE table_name LIKE '%cust%'

    How can display all table name in a Database ?


Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!