How to get a list of table names for a database via ODBC in Windows using mxODBC/python?

Chris Humphries chumphries at devis.com
Sun Oct 6 20:28:38 CEST 2002


pg_tables for postgresql.

something like this:

"select tablename from pg_tables where tablename !~ '^pg_'"



Markus wrote:
> Ouyang wrote:
> 
> 
>>Does anyone know how to get a list of table names for a database via
>>ODBC in Windows using mxODBC and python? Thanks in advance.
> 
> 
> I don't know anything about ODBC, but for most SQL servers there should be 
> some system catalog/table containing all database objects.
> 
> For Oracle you could use something like "select table_name from 
> user_tables".
> 
> Markus






More information about the Python-list mailing list