use information_schema - it's a LOT easier


select table_name
from information_schema.tables


Simple, isn't it? <g>

-----Original Message-----
From: Eric Creese [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 5:13 PM
To: CF-Talk
Subject: QUERY TABLE DATA INFORMATION

I am using the following to get the tablename, column, datatype and
length from my SQL Server DB. I only want tables. I am having a brain
fart to criteria only tables. Here is my SQL

SELECT
sysobjects.Name as Tablename,
Syscolumns.Name as Fieldname,
Systypes.Name as FieldDataType,
Syscolumns.length as FieldLength
FROM sysobjects, Syscolumns, systypes
WHERE  sysobjects.ID = Syscolumns.ID
AND Syscolumns.xtype = Systypes.xtype
ORDER BY sysobjects.Name
  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to