• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Dynamically selecting all tables

LEGEND ,
Jul 17, 2006 Jul 17, 2006

Copy link to clipboard

Copied

Anyone know of a way to select all "Tables" in a database? I'm trying to
populate a list menu with the table names of a SQL Server database.

TIA

Bill


TOPICS
Advanced techniques

Views

250

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 17, 2006 Jul 17, 2006

Copy link to clipboard

Copied

here's one way:

SET NOCOUNT ON
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
SET NOCOUNT OFF

HTH
--
Tim Carley
www.recfusion.com
info@NOSPAMINGrecfusion.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 17, 2006 Jul 17, 2006

Copy link to clipboard

Copied

LATEST
That did it. Thanks Mountain Lover. I've never had a need to do that before.
Glad you pointed it out.

Bill


"Mountain Lover" <info@NOSPAMrecfusion.com> wrote in message
news:e9h8l0$fkr$1@forums.macromedia.com...
> here's one way:
>
> SET NOCOUNT ON
> SELECT TABLE_NAME
> FROM INFORMATION_SCHEMA.TABLES
> WHERE TABLE_TYPE = 'BASE TABLE'
> SET NOCOUNT OFF
>
> HTH
> --
> Tim Carley
> www.recfusion.com
> info@NOSPAMINGrecfusion.com


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation