Skip to main content
Known Participant
August 10, 2009
Question

Discover SQL Table Names

  • August 10, 2009
  • 3 replies
  • 1749 views

I am attempting to access our Oracle db and the folks in my company that setup the ODBC connection are not the DBAs. Our Oracle has a ton of tables. Is there a cfc/function to be able to pull a simple listing of the table names?

This topic has been closed for replies.

3 replies

Inspiring
August 12, 2009

You might try using the CFDBINFO tag.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_01.html#3996857

fs22Author
Known Participant
August 12, 2009

Unfortunately, we are on CF7. Thanks anyway.

Inspiring
August 24, 2009

have you tried

Select * from TAB;

There are other Oracle synonyms for things like lists of tables. Indeed SYN is one of them I think. So select * from SYN; also works kind of.

This is all from memory but I've just checked it anmd its wokring on our old Oracle instances.

regards

Steve

Inspiring
August 10, 2009

use cfquery.

google "oracle table names" to get the sql.

August 10, 2009

I do it like this in MySQL, I'm sure there is something similar for Oracle.

<cfquery name="show" datasource="#application.dsn#">
show tables;
</cfquery>

<cfdump var="#show#" />

-sean