system tables
Posted in 1993
Quoting David Snyder, who is quoting me.... ->Quoting Alan Popiel... ->} ->} Anyway, try these: ->} ->} SELECT tabname FROM systables ->} WHERE NOT tabname MATCHES "sys*" { to not print the system catalog tables } ->} ORDER BY tabname ->} ; ->} SELECT tabname table_name, colname column_name, colno column_order ->} FROM systables t, syscolumns c ->} WHERE t.tabid = c.tabid ->} AND NOT tabname MATCHES "sys*" { to not print the system catalog tables } ->} ORDER BY tabname, colno ->} ; ->} ->Well you just ommitted 3 user tables from my database because they just ->happen to begin with "sys". It's much safer to say: -> -> WHERE tabid >= 100 -> ->DAS Dog gone, it is hard (probably impossible) to satisfy everyone. I chose 'NOT tabname MATCHES "sys*"' because syscolval and syscolatt, which are created by upscol, and sysmenus and sysmenuitems, which are created by the Informix integrated environment, have tabid >= 100; but I still consider them to be "system" tables, rather than user tables. I have developed a data dictionary product which creates tables syscoldef, systabdef, and syssubdb, which I also consider "system" tables. It is an okay choice, but one I would not make, to name a *real* user table with a name that starts with "sys". Regards, Alan +------------------------------+---------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, LSC | ( Please note: My opinions do not ) | | P.O. Box 179, M/S 5422 | ( represent official Martin policy. ) | | Denver, Colorado 80201-0179 | Voice: 303-977-9998 | +------------------------------+---------------------------------------+