Re: table listing
Posted in 2006
Topics: Server Administration, Platform-Specific Issues
vallinayag@yahoo.co.in wrote:
> Hi
>
> I am using dbaccess from linux to access Informix db.
>
> Is there any sql that will list all the tables in the database i chose.
Non-catalog tables:
select tabname
from systables
where tabid > 99 and tabtype = 'T';
Views:
select tabname
from systables
where tabid > 99 and tabtype = 'V';
Synonyms:
select tabname
from systables
where tabid > 99 and tabtype = 'S';
You can also use the dbaccess built-in info verb:
info tables;
info columns for table <mytable>;
info indexes for table <mytable>;
info fragments for table <mytable>;
etc.
See the dbaccess manual for dbaccess verbs and the Guide to SQL Reference
for details of the public system catalog tables.
Art S. Kagel
Thank you everyone. It worked.
Regards
Vallinayagam
Art S. Kagel wrote:
> vallinayag@yahoo.co.in wrote:
> > Hi
> >
> > I am using dbaccess from linux to access Informix db.
> >
> > Is there any sql that will list all the tables in the database i chose.
>
> Non-catalog tables:
> select tabname
> from systables
> where tabid > 99 and tabtype = 'T';>
> Views:
> select tabname
> from systables
> where tabid > 99 and tabtype = 'V';>
> Synonyms:
> select tabname
> from systables
> where tabid > 99 and tabtype = 'S';>
> You can also use the dbaccess built-in info verb:
>
> info tables;
>
> info columns for table <mytable>;
>
> info indexes for table <mytable>;
>
> info fragments for table <mytable>;
>
> etc.
>
> See the dbaccess manual for dbaccess verbs and the Guide to SQL Reference
> for details of the public system catalog tables.
>
> Art S. Kagel