Sybase查询所有表及字段

select
d.name,
a.name as 字段名,
upper(b.name) as 字段类型,
a.length as 长度,
upper((case when a.status =8 then 'null' else 'not null' end)) as 是否为空
FROM syscolumns a left join systypes b
on a.usertype=b.usertype
inner join sysobjects d
on a.id=d.id and d.type='U' and d.name<>'dtproperties'
left join syscomments e
on a.cdefault=e.id
WHERE d.name NOT LIKE 'TXN_%'
ORDER BY d.name

posted @ 2022-01-11 15:55  一只竹节虫  阅读(1073)  评论(0编辑  收藏  举报