国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > SQL Server > 正文

SQL 判斷字段類型語句

2024-08-31 00:59:11
字體:
來源:轉載
供稿:網友
-->Title:Generating test data
-->Author:wufeng4552
-->Date :2009-09-25 09:56:07
if object_id('tb')is not null drop table tb
go
create table tb(ID int,name text)
insert tb select 1,'test'
go
--方法1

復制代碼 代碼如下:


select sql_variant_property(ID,'BaseType') from tb


--方法2

復制代碼 代碼如下:


select object_name(ID)表名,
c.name 字段名,
t.name 數據類型,
c.prec 長度
from syscolumns c
inner join systypes t
on c.xusertype=t.xusertype
where objectproperty(id,'IsUserTable')=1 and id=object_id('tb')

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 家居| 鄂伦春自治旗| 和平区| 崇阳县| 宣城市| 遂昌县| 汝州市| 新巴尔虎右旗| 清徐县| 阳谷县| 昌图县| 舞阳县| 仁寿县| 呈贡县| 南华县| 淳化县| 镇远县| 麻城市| 桃江县| 射阳县| 萨迦县| 吉安县| 绥化市| 迁安市| 勃利县| 文成县| 筠连县| 巫溪县| 白沙| 西乌珠穆沁旗| 龙州县| 东丽区| 八宿县| 卢氏县| 津南区| 蒲江县| 北碚区| 宣武区| 德兴市| 沙洋县| 腾冲县|