all
Business
Careers and Education
IT
Apache Web Server
Content Management Systems
IIS / Microsoft Internet Information Services
Mac OS X
Microsoft Windows
Networking
Unix / Linux / BSD
Development
.NET Framework
ASP / Active Server Pages
ASP.NET
Algorithms / Advanced Math
C / C++
C# / C Sharp
ColdFusion
DB2 Database
Flash / Actionscript
HTML / CSS
Java
JavaScript / Ajax / DHTML
Microsoft Access / VBA
Microsoft SQL Server
Mobile Development
MySQL Database
Oracle Database
PHP
Perl
PostgreSQL Database
Python
Ruby / Ruby on Rails
Software Development
Visual Basic .NET
Visual Basic 4 / 5 / 6
XAML / WPF / Silverlight
XML
sign up
login
new member:
Register
member login:
Email Address:
Password:
lost password?
bytes
>
microsoft sql server
>
microsoft sql server questions
How to get table list from a db? Thanks!
rong.guo@gmail.com
Posts: n/a
#
1
: Aug 2 '05
Hi Group!
I would like to get a list of all the table names from a database, can
anybody please tell me how to do that? Many thanks!
Simon Hayes
Posts: n/a
#
2
: Aug 2 '05
re: How to get table list from a db? Thanks!
See sp_tables and sysobjects in Books Online.
Simon
Madhivanan
Posts: n/a
#
3
: Aug 2 '05
re: How to get table list from a db? Thanks!
Select table_name from information_schema.tables
where table_type='Base table' order by table_name
Madhivanan
Chandra
Posts: n/a
#
4
: Aug 4 '05
re: How to get table list from a db? Thanks!
Hi, you can write it as:
SELECT name [Table Name]
FROM sysobjects
WHERE xtype = 'U'
Please let me know if this helped
best Regards,
Chandra
http://www.SQLResource.com/
http://chanduas.blogspot.com/
---------------------------------------
*** Sent via Developersdex
http://www.developersdex.com
***
Madhivanan
Posts: n/a
#
5
: Aug 4 '05
re: How to get table list from a db? Thanks!
Chandra, It is better to use views and avoid using system tables
Madhivanan
«
previous question
|
next question
»
Similar topics
Jquery table sorting help
(
JavaScript / Ajax / DHTML answers
)
previous declaration of Table was here / conflicting types for
(
C / C++ answers
)
Storing large arrays in a table
(
Microsoft Access / VBA answers
)
Auto Populate Based on fields from another table
(
Microsoft Access / VBA answers
)
Multiple Table DataSet
(
Visual Basic .NET answers
)
XSL:FO Table of content aligning page numbe to right margin???
(
.NET Framework answers
)
Problem with background color of table cell
(
ASP.NET answers
)
Pivot Table
(
Microsoft Access / VBA answers
)
Automatically scrolling a dynamic table
(
JavaScript / Ajax / DHTML answers
)
Adding Arraylist Items to an asp table. Please help me
(
.NET Framework answers
)
More channels
Business
IT
Development
Copyright 1995-2010 BYTES. All rights Reserved
About Bytes
|
Help
Latest Expert Topics
|
Popular Tags
Sitemap
|
Microsoft SQL Server Answers Sitemap
|
Microsoft SQL Server Insights Sitemap