判断数据表中某列的数据类型
select a.name as [column],b.name as type
from syscolumns a,systypes b
where a.id=object_id('表') and a.xtype=b.xtype and a.name='列'结果示例
| column | type |
| userphone | varchar |

微信扫码查看本文
判断数据表中某列的数据类型
select a.name as [column],b.name as type
from syscolumns a,systypes b
where a.id=object_id('表') and a.xtype=b.xtype and a.name='列'| column | type |
| userphone | varchar |

发表评论