--字符型
select isnull(mycol,'0') as newid from mytable
--整型
select isnull(mycol,0) as newid from mytable
isnull(字段名称,0) as 字段名称
columnName为字段名
case when columnName is null then 0 else columnName end
create table MyTable(
MyCol int not null default 0
)
建表的时候建列的默认值为0;