> Is there a SQL command, or CF Function that can get the names of all the 
tables in a database?

Chad

It depends what DBMS you're using.

If it's Access, look here

http://www.thenetprofits.co.uk/coldfusion/faq/#answer77

Otherwise I believe the following queries are mostly correct:

Ingres:            SELECT relname FROM iirelation
Oracle:            SELECT table_name FROM user_tables
PostgreSQL:        SELECT relname FROM pg_class
MS SQL Server:     SELECT name FROM sysobjects WHERE type = 'U'
Informix:          SELECT tabname FROM systables WHERE tabtype = 'T'
Sybase SQL Server: SELECT name FROM sysobjects WHERE type = 'U'

MySQL:             Can't be done using simple SQL commands.

Aidan, maybe you could add these to the FAQ?

Nick



**********************************************************************
Information in this email is confidential and may be privileged. 
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**********************************************************************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to