56,687
社区成员
发帖
与我相关
我的任务
分享
select count(1) from information_schema.tables where table_name = 'ViewTb1' into @cnt;
if @cnt = 0 then
select * from ViewTb2 where pos < 7
else
select * from ViewTb1 where pos < 7
end if;
select count(1) from information_schema.tables where table_name = 'ViewTb1' into @cnt;
if @cnt = 0 then
select * from ViewTb2 where pos < 7 limit 0;
else
select * from ViewTb1 where pos < 7;
end if;