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

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)
)



select count(c1.name) + case when count(*) = 0 then 1 else 0 end  from #CheckTest c
left join #CheckTest c1 on c.name = c1.name and c1.name = 'test'


drop table #CheckTest

Enter Parameters

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