-
query for tables
hi,
how do i query for all the tables in a database?
much thanks,
andy
-
Re: query for tables
oops, forgot to specify... SQL Server 7.0
i just want to get the names of the tables in a particular db.
thx.
"andy" <andy@nospam_zr1.com.com> wrote:
>
>hi,
>
>how do i query for all the tables in a database?
>
>much thanks,
>andy
-
Re: query for tables
sp_tables or
SELECT *
FROM INFORMATION_SCHEMA.TABLES
--
HTH,
David Satz
Principal Software Engineer
Hyperion Solutions
->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
(Please reply to group only - emails answered rarely)
-----------------------------------------------------------------
"andy" <andy@nospam_zr1.com> wrote in message
news:3b02bd48$1@news.devx.com...
>
> oops, forgot to specify... SQL Server 7.0
>
> i just want to get the names of the tables in a particular db.
>
> thx.
>
> "andy" <andy@nospam_zr1.com.com> wrote:
> >
> >hi,
> >
> >how do i query for all the tables in a database?
> >
> >much thanks,
> >andy
>
-
Re: query for tables
David,
thanks for the response. when i run either of these commands against the
pubs db, i get a list that just says "pubs" 32 times... that's it... no table
names.
andy
"DaveSatz" <davidsatz@yahoo.com> wrote:
>sp_tables or
>SELECT *
>FROM INFORMATION_SCHEMA.TABLES
>--
>HTH,
>David Satz
>Principal Software Engineer
>Hyperion Solutions
>->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
>(Please reply to group only - emails answered rarely)
>-----------------------------------------------------------------
>
>"andy" <andy@nospam_zr1.com> wrote in message
>news:3b02bd48$1@news.devx.com...
>>
>> oops, forgot to specify... SQL Server 7.0
>>
>> i just want to get the names of the tables in a particular db.
>>
>> thx.
>>
>> "andy" <andy@nospam_zr1.com.com> wrote:
>> >
>> >hi,
>> >
>> >how do i query for all the tables in a database?
>> >
>> >much thanks,
>> >andy
>>
>
>
-
Re: query for tables
sp_tables return several columns. You can use:
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
to show all tables and views' names
"andy" <andy@nospam_zr1.com> wrote in message news:3b02ca06@news.devx.com...
>
> David,
>
> thanks for the response. when i run either of these commands against the
> pubs db, i get a list that just says "pubs" 32 times... that's it... no
table
> names.
>
> andy
>
> "DaveSatz" <davidsatz@yahoo.com> wrote:
> >sp_tables or
> >SELECT *
> >FROM INFORMATION_SCHEMA.TABLES
> >--
> >HTH,
> >David Satz
> >Principal Software Engineer
> >Hyperion Solutions
> >->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
> >(Please reply to group only - emails answered rarely)
> >-----------------------------------------------------------------
> >
> >"andy" <andy@nospam_zr1.com> wrote in message
> >news:3b02bd48$1@news.devx.com...
> >>
> >> oops, forgot to specify... SQL Server 7.0
> >>
> >> i just want to get the names of the tables in a particular db.
> >>
> >> thx.
> >>
> >> "andy" <andy@nospam_zr1.com.com> wrote:
> >> >
> >> >hi,
> >> >
> >> >how do i query for all the tables in a database?
> >> >
> >> >much thanks,
> >> >andy
> >>
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks