create table #CheckTest( name varchar(50) ) if (select ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computer Science Educators

Q&A for those involved in the field of teaching Computer Science

create table #CheckTest(
    name varchar(50)
)


if (select case when (select count(*) from #CheckTest) = 0 then 1 else 0 end
    +
    (select count(*) from #CheckTest where name = 'test') ) > 0
begin
   select 'fail'
end
else
begin
  select 'success'
end

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results