SQL取字段类型

存于每一个数据库的syscolumns表里面的name就是列名,xtype就是数据类型,但是这个xtype是数字的,下面是数字和数据类型对应的关系;

       xtype=34 'image'
       xtype=35 'text'
       xtype=36 'uniqueidentifier'
       xtype=48 'tinyint'
       xtype=52 'smallint'
       xtype=56 'int'
       xtype=58 'smalldatetime'
       xtype=59 'real'
       xtype=60 'money'
       xtype=61 'datetime'
       xtype=62 'float'
       xtype=98 'sql_variant'
       xtype=99 'ntext'
       xtype=104 'bit'
       xtype=106 'decimal'
       xtype=108 'numeric'
       xtype=122 'smallmoney'
       xtype=127 'bigint'
       xtype=165 'varbinary'
       xtype=167 'varchar'
       xtype=173 'binary'
       xtype=175 'char'
       xtype=189 'timestamp'
       xtype=231 'nvarchar'
       xtype=239 'nchar'
       xtype=241 'xml'
       xtype=231 'sysname'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值