Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unknown table

Status
Not open for further replies.

hameja

Programmer
Oct 15, 2003
42
BE
Dear All

I want to select some piece of data from unknown table. I know from oracle or informix there dba_tables and user_tables where you can formulate a query.

2. Which table holds other tables.

John
 
Code:
select * from information_schema.tables

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
or:
Code:
select * from sysobjects
where xtype = 'u'

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Last time there were two xtypes that you told me to remember...of course I forgot the 2nd one. Was it for something else?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
if you do a
Code:
select distinct(xtype)
from sysobjects

there are 10 types
X
P
PK
TF
IF
FN
U
D
V
S

all system object types
PK - primary key
U - user object
V view
not sure about all of them

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top