Chris Nizzardini, Salt Lake City Utah, Web Developer Specializing in LAMP+Ajax Since 2006

My Blog

Here is my awesome blog. You can find information on programming, linux, documentation, tips for code and database optimization, my thoughts and rants, and whatever else I feel like sharing. Feel free to contribute to the blog by posting comments and asking questions.
SQL

MS SQL Show Tables in a Database (Microsoft SQL)

In MS SQL use the following SQL to show all tables in the selected database. This is the equivalent of MySQLs show all tables.

MS SQL queries for show table:

1
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';

Using this query syntax you can display all tables in a MS SQL database. Hmmm… I think I like the MySQL way for showing all tables better:

1
SHOW ALL TABLES;

Drop me a comment if this helped your or if you feel I missed something, thanks for reading.

Related posts:

  1. Querying MS SQL database looking for a specific column
  2. Mod-Log-SQL – Storing Apache Access Logs in a MySql Database
  3. moving innodb mysql tables & database to a new server
  4. mysql running sql files
  5. preventing sql injection attacks on mysql, php, lamp servers

Tags: ,

3 Responses to “MS SQL Show Tables in a Database (Microsoft SQL)”

  1. Rishi Pandit says:

    query SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = ‘BASE TABLE’ worked in ms-sql. Thanks

  2. Vladimir says:

    Thanks for this. It’s help optimize my .net code. Nice! =)

  3. Mannan says:

    None of the querries are working my database name is Mannan I want to display the table sin this database plzz help.

Leave a Reply