Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2005, 09:44 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table names

Hi,
I have a database in Sql Server where I need to know the names of all the tables in the database called Game.
What is the query to do so.
Please Help.
 
Old November 24th, 2005, 09:48 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

In Query Analyzer, type the following T-SQL stateement:

SELECT name FROM sysobjects WHERE type= 'u'

Make sure you have selected the database in which you want to retrieve the tables.

Scott

 
Old November 24th, 2005, 09:55 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Scott
That was great!!
 
Old November 24th, 2005, 10:01 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Your welcome. Glad I could help. Have a good day.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a List Box with Table Names & Table date hewstone999 Access VBA 1 February 27th, 2008 10:10 AM
MySQL table names question cutesneakers PHP How-To 2 January 11th, 2005 12:35 AM
How to Get Table Names in ASP using ADO ramk_1978 ADO.NET 2 October 26th, 2004 03:31 PM
How to Retrieve Table Names using ADO ramk_1978 ADO.NET 1 October 22nd, 2004 08:19 AM
Opening unknown table names NiMot VB Databases Basics 2 July 17th, 2003 02:37 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.