若查询没有数据的时候,怎样做可以得到一条所有字段全为0 的数据
2个回答
展开全部
with t1 as (select id,num from t),
t2 as (select 0 id, 0 num)
select * from t1
union all
select * from t2 where (select count(*) from t1)=0
t2 as (select 0 id, 0 num)
select * from t1
union all
select * from t2 where (select count(*) from t1)=0
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询