How do i check if something exist without using count(*) ... limit 1

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-05-19T20:47:12Z Indexed on 2010/05/19 20:50 UTC
Read the original article Hit count: 102

Filed under:

My code is SELECT COUNT(*) FROM name_list WHERE [name]='a' LIMIT 1

It appears there is no limit clause in SQL Server. So how do i say tell me if 'a' exist in name_list.name?

© Stack Overflow or respective owner

Related posts about sql-server