Welcome to Dream.In.Code
Become an Expert!

Join 150,000 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,335 people online right now. Registration is fast and FREE... Join Now!




querying tables

 
Reply to this topicStart new topic

querying tables

the_hangman
13 Dec, 2006 - 08:31 AM
Post #1

D.I.C Addict
Group Icon

Joined: 18 Jan, 2006
Posts: 593



Thanked: 1 times
Dream Kudos: 200
My Contributions
This may sound a little odd, but is there a way that one could query to see what tables are in a database?

I have a database on a web server and I use a web based PHPAdmin environment to edit it. The admin thing itself obviously lists what tables are in my database and I was wondering how I could retrieve that information similarly.
User is offlineProfile CardPM
+Quote Post

Skinnyarms
RE: Querying Tables
13 Dec, 2006 - 09:22 AM
Post #2

New D.I.C Head
*

Joined: 18 Nov, 2006
Posts: 32


My Contributions
QUOTE(the_hangman @ 13 Dec, 2006 - 09:31 AM) *

This may sound a little odd, but is there a way that one could query to see what tables are in a database?

I have a database on a web server and I use a web based PHPAdmin environment to edit it. The admin thing itself obviously lists what tables are in my database and I was wondering how I could retrieve that information similarly.



CODE

SHOW TABLES FROM your_db_name;


THere's an article on stuff like that for mySql here. I don't actually know that your using mySql, but it's pretty similar for the rest.

This post has been edited by Skinnyarms: 13 Dec, 2006 - 09:23 AM
User is offlineProfile CardPM
+Quote Post

Mach1Guy
RE: Querying Tables
13 Dec, 2006 - 10:03 AM
Post #3

D.I.C Head
Group Icon

Joined: 4 Dec, 2006
Posts: 79



Thanked: 4 times
Dream Kudos: 25
My Contributions
I seriously doubt your using Oracle, especially in this case. but just in case you are
SELECT table_name from USER_TABLES;
User is offlineProfile CardPM
+Quote Post

the_hangman
RE: Querying Tables
13 Dec, 2006 - 10:23 AM
Post #4

D.I.C Addict
Group Icon

Joined: 18 Jan, 2006
Posts: 593



Thanked: 1 times
Dream Kudos: 200
My Contributions
Unfortunately neither one of those worked =/
User is offlineProfile CardPM
+Quote Post

Mach1Guy
RE: Querying Tables
13 Dec, 2006 - 11:07 AM
Post #5

D.I.C Head
Group Icon

Joined: 4 Dec, 2006
Posts: 79



Thanked: 4 times
Dream Kudos: 25
My Contributions
well what database are you using?
User is offlineProfile CardPM
+Quote Post

the_hangman
RE: Querying Tables
13 Dec, 2006 - 11:24 AM
Post #6

D.I.C Addict
Group Icon

Joined: 18 Jan, 2006
Posts: 593



Thanked: 1 times
Dream Kudos: 200
My Contributions
just for the know, I don't know much about databases yet.

but I am going to eventually be using several databases, most commonly Microsoft Access Databases, and another general SQL database

I am trying to write applications for work in visual basic that do certain things with the databases, but I don't know much about the SQL queries I need
User is offlineProfile CardPM
+Quote Post

the_hangman
RE: Querying Tables
13 Dec, 2006 - 01:43 PM
Post #7

D.I.C Addict
Group Icon

Joined: 18 Jan, 2006
Posts: 593



Thanked: 1 times
Dream Kudos: 200
My Contributions
I figured it out. I posted the solution as a VB.NET snippet
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 08:31PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month