Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 17th, 2003, 06:58 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ittorget
Default List tablesname from database & list databasename

I need to found out how to get a return statement of tables(name) from a database.

Database1
  table1
  table2

Database2
  table1

I need to return both database and the tables from that database !

Reply With Quote
  #2 (permalink)  
Old November 17th, 2003, 10:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use SHOW DATABASES to get the list of databases in the server.

And use SHOW TABLES to list the tables in a given database.

Hope that helps.

Cheers!

-Vijay G
Reply With Quote
  #3 (permalink)  
Old September 5th, 2005, 05:43 AM
Authorized User
 
Join Date: Aug 2005
Location: Mumbai, Maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abhisheksud Send a message via Yahoo to abhisheksud
Default

Could you please tell the full code....
Reply With Quote
  #4 (permalink)  
Old September 10th, 2005, 03:06 AM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sriram6781
Default

You can query sysobjects if you are using SQL Server and search for XTYPE='U'

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM
List Style & Positioning Help Needed DanDan CSS Cascading Style Sheets 1 February 23rd, 2005 02:56 PM
Query database for List of tables & other details imsuneeta SQL Server 2000 2 January 18th, 2005 07:48 AM
Translate list & merge grahampinkney Access 3 March 1st, 2004 07:44 AM



All times are GMT -4. The time now is 09:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.