您的位置:首页 > 博客中心 > 数据库 >

必须会的SQL语句(五)NULL数据处理和类型转换

时间:2022-03-14 04:27

1.Null数据的处理      select          name,          isnull ( cast (字段 as varchar(20)) , ‘空‘)      from 表名           --‘101‘可以用表中字段来替换         select cast(‘101‘ as varchar(20))        2)Convert         select convert(varchar(20),100)

热门排行

今日推荐

热门手游