用户名: 密码: 忘记密码? 注册
收藏此问题 发表新评论

作得漂亮,赞一下

select a.name as name,b.name as type,a.length as length ,a.type as flg ,a.prec as prec,a.scale as scale ,a.status as status, c.text as deftext
from syscolumns a,systypes b,syscomments c
where a.usertype=b.usertype and  a.id=object_id('"+tablename+"') and a.cdefault*=c.id
order by a.colid

联立取一下table中的column中的default表达式。
昵称: tanjiyong138  时间: 2011-06-04 10:02:00
Sybase自动生成数据库内所有表的DDL语句的存储过程
http://www.dbainfo.net/get-table ... -sp_gettabledll.htm
昵称: andkylee  时间: 2011-06-04 13:32:00
发表评论
昵称:
内容:
验证: