56,914
社区成员




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;