1.
select syscolumns.name, systypes.name, syscolumns.length from syscolumns
left join systypes on syscolumns.xtype=systypes.xtype
where id=(select id from sysobjects where name='tablename')
2.
SELECT syscolumns.name,systypes.name,syscolumns.isnullable,syscolumns.length
FROM syscolumns, systypes
WHERE syscolumns.xusertype = systypes.xusertype AND syscolumns.id = object_id('datecg')
沒有留言:
張貼留言