Re: dumb sql question (fwd)
Posted in 1993
Naomi Walker — — source: Informix-list mailing list archive (1991-1998)
> Is there a way to querry a database (whose name you do know) and get a
> list of its tables ? I'd also like to get a list of columns for a table
> (once I know its name)
>
> I'm trying to build an ad-hoc querry tool.
>
Yup. Try:
select tabname, tabid from systables;
to get a list of the table names.
To get columns for that table:
select * from syscolumns where tabid=xxxx;
xxxx is the tabid of the table of interest.
--
Naomi Walker (aka N7FSA) naomi@anasazi.com
Phoenix, Arizona
To get the full value of joy,
you must have someone to divide it with. ---Mark Twain