How to get the list of all tables from a SQL Server database ?

Published on August 29, 2016 by abundantcode

Filed under SQL Server

Last modified August 29, 2016

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 5135 times

If you need to get the list of all tables from a SQL Server database , you can query the information_schema.tables by specifying the TABLE_TYPE parameter search criteria to "BASE TABLE’.

How to get the list of all tables from a SQL Server database ?

Use AdventureWorks2014
GO
SELECT * FROM information_schema.tables WHERE TABLE_TYPE=’BASE TABLE’

image

Leave a Comment


x

You might be Interested in these Posts

C Program to find the G.C.D of a number using Recursive function

Problem Write a program in C to find the find the G.C.D of a number using recursion and display the ...

C Program to print a Half Pyramid using *

Problem Write a program in C to print Half pyramid using * as shown. * * * * * * * * * * ...

C Program to display Positive factors of a number

Problem Write a program in C to display all the positive factors of a number enter by the user. Ho...