Ingres help.

Associate
Joined
18 Oct 2002
Posts
2,154
Location
Leicester, UK
Hi All,

I am trying to select all table names from my database but I cannot seem to be able to do it.

Can this be done?

Cheers,

TrUz
 
Hi,

Good to see another Ingres user!

Connect to the database you want to get the tables for and select from the iitables view:

select *
from iitables;
commit;

You might want to exclude any system catalogs which usually start with ii:

select *
from iitables
where table_name not like 'ii%';
commit;

Further, you can look at the columns of a table by looking in the iicolumns view:

select *
from iicolumns
where table_name = 'mytablename';
commit;

As these are both views they can't be updated, but changes to the tables their base tables will be automatically seen e.g if you create a new table.

You might well need to be connected as "ingres" to do these selects.

Hope that helps.

Regards,
Jim
 
Hi JIMA,

Many thanks for that mate, you have saved me a head ache. :)

Cheers,

TrUz
 
Back
Top Bottom