A B C D E F
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
这是我现在的查询结果我用的是c#winform的datagridview控件其中数据库中D列还没有存放数据 我想把查询结果显示成这样的
A B C D E F
1 2 3 null 4 5
1 2 3 null 4 5
1 2 3 null 4 5
1 2 3 null 4 5请问该怎么去写呢
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
这是我现在的查询结果我用的是c#winform的datagridview控件其中数据库中D列还没有存放数据 我想把查询结果显示成这样的
A B C D E F
1 2 3 null 4 5
1 2 3 null 4 5
1 2 3 null 4 5
1 2 3 null 4 5请问该怎么去写呢
对不对
create table haha
(
a int,
b int,
c int,
d int,
e int
)
goinsert into haha(a,b,c,e) values(2,3,4,4)
insert into haha(a,b,c,e) values(2,3,4,4)
insert into haha(a,b,c,e) values(2,3,4,4)
go
select a,b,c,d=case
when d is null then 'null' end,e from haha
go
转换下好了,其实用VARCHAR就可以了啊?你的精度要求很高吗?
转换下好了,不过直接用VARCHAR也可以啊!你的精度要求很高吗?
那这样吧