How can I list all user tables on an SQL Server?

A. The SQL Server specific way (all versions) is :-

select name from sysobjects where type = 'U'

The ANSI standard way (SQL 7 only) is :-

select TABLE_NAME from INFORMATION_SCHEMA.TABLES


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish