//TTable,TTQuery for i := 0 to FieldDefs.Count - 1 do begin sTmp := FieldDefs.Items[i].Name;//DataType,Size,Required
SELECT b.* FROM sysobjects a,syscolumns b where a.id=b.id and a.name='表名'
select b.name AS 字段, c.name as 数据类型 , b.length as 长度, case b.isnullable when 0 then 'not null' when 1 then 'null'end as 是否为空 from sysobjects a,syscolumns b,systypes c where a.name='表名' and a.id = b.id and b.usertype=c.usertype order by colid
for i := 0 to FieldDefs.Count - 1 do
begin
sTmp := FieldDefs.Items[i].Name;//DataType,Size,Required
FROM sysobjects a,syscolumns b
where a.id=b.id
and a.name='表名'
c.name as 数据类型 ,
b.length as 长度,
case b.isnullable when 0 then 'not null' when 1 then 'null'end as 是否为空
from sysobjects a,syscolumns b,systypes c
where a.name='表名' and a.id = b.id and b.usertype=c.usertype
order by colid