insert into tab2
select * from tab3 where exists (select * from tab1)
union all
select * from tab4 where not exists (select * from tab1);
Joe "Igor" Wilson
--- Yuriy Martsynovskyy <[EMAIL PROTECTED]> wrote:
> Is it possible to write a conditional SQL code like this? CASE
> expression does n
Is it possible to write a conditional SQL code like this? CASE
expression does not seem to work here
IF (exists (Select * from tab1))
THEN
Insert into tab2 select * from tab3
ELSE
Insert into tab2 select * from tab4
ENDIF;
--
2 matches
Mail list logo