how to find unknown table name from databas

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nirmalsingh
    New Member
    • Sep 2006
    • 218

    how to find unknown table name from databas

    i know database name but i couldn't find table names corresponding to the database in query analyzer. help me to solve.....
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by nirmalsingh
    i know database name but i couldn't find table names corresponding to the database in query analyzer. help me to solve.....
    Hi. This will do the trick
    Code:
    USE YourDatabaseNameHere
    SELECT name
    FROM dbo.sysobjects
    WHERE xtype = 'U'

    Comment

    • nirmalsingh
      New Member
      • Sep 2006
      • 218

      #3
      Originally posted by willakawill
      Hi. This will do the trick
      Code:
      USE YourDatabaseNameHere
      SELECT name
      FROM dbo.sysobjects
      WHERE xtype = 'U'


      thank u mam, its working well. i am so much thankful to u.

      Comment

      • Anu139
        New Member
        • Nov 2006
        • 8

        #4
        Originally posted by willakawill
        Hi. This will do the trick
        Code:
        USE YourDatabaseNameHere
        SELECT name
        FROM dbo.sysobjects
        WHERE xtype = 'U'

        HI U CAN ALSO USE THE FOLLOWING CODE.,
        IT WILL DISPLAY ALL THE USER TABLES......

        select TABLE_NAME from information_sch ema.tables

        Comment

        Working...