show all tables

  • Hi ,

    Is there a command to show all tables in a database in sql server? Is it possible to see all the tables in all databases using a command? Suppose if i want all the dependencies (like which table is dependent on which) how can I do that?

    Thanks in advance,

    Sridhar!! 

  • 1st question ... select * from INFORMATION_SCHEMA.TABLES

    Michael

  • 2nd question ... 1 way:

    exec sp_MsForeachTable 'exec sp_MStablerefs @tablename = ''?'', @direction = ''both'''

    /rockmoose


    You must unlearn what You have learnt

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

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