can we see all database tables

  • hi ,

    can we all all database tables with single query.

    thaxxx

    regards

    jagpal singh

  • Hi,

    Assuming you want to list all tables in current database? If so, here's one solution:

    SELECT * from sys.tables

    Thanks,

    Phillip Cox

    MCITP - DBAdmin

  • jagpalsingh4 (3/10/2008)


    hi ,

    can we all all database tables with single query.

    thaxxx

    regards

    jagpal singh

    Phillip's code is the one that I'd prefer on SQL Server 2005 and later, but if you also want to use your code on other dbms, you may choose the SQL Standard's way:

    SELECT TABLE_NAME

    FROM INFORMATION_SCHEMA.TABLES

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply