PDA

View Full Version : List all the table names of the database


BarrMan
05-29-2006, 02:09 PM
How can I list all the table names of the database?
For example:
Name
A1
A2
A3
A4

Those are the tables in the database and when I write the command it should show me all the names of them.

Thanks.

Roelf
05-29-2006, 02:50 PM
a quick google gave these (promising) results:
http://www.kamath.com/codelibrary/cl002_listtables.asp
http://www.codeproject.com/aspnet/databasetables.asp

BarrMan
05-29-2006, 03:32 PM
O.o :D
This is EXACTLY what i was looking for!
I've looked hours to find this code but.. erm.. i guess i'm not that good at googling.
may i ask what you wrote there?
Thanks ALOT!

BarrMan
05-29-2006, 03:47 PM
Oh... I've just ran into another problem...
I want to make a database with sql statements but i need to know the data_type for each record but I can't because i'm retreiving it from another database.
How can I get the record data type from another database?
I mean: rs.field.name = name of the record and i need the type of the record too..
Thanks!

vinyl-junkie
05-29-2006, 04:48 PM
SHOW COLUMNS will show you what they look like. See this page (http://dev.mysql.com/doc/refman/5.0/en/show-columns.html) in the MySQL manual.

BarrMan
05-29-2006, 05:05 PM
Oh, But how can I see it in asp? I'm not very much familiar with sql only language... I use the sql only for databases.

Thanks!

Roelf
05-30-2006, 07:52 AM
O.o :D
This is EXACTLY what i was looking for!
I've looked hours to find this code but.. erm.. i guess i'm not that good at googling.
may i ask what you wrote there?
Thanks ALOT!
Uhm, i wrote:list tables in database

For the datatypes, i think this will help you further:
http://riccardi.pearsoncmg.com/dbmgmt/bighit/source.asp?file=showtable.asp