Sql server case when exists sql

How do I use this?

sql server case when exists sql

Id, case when select B. By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service.

SqlHints.com

You can't post HTML code. There are some situations you can't use it e.

sql server case when exists sql

And if you plan to define this query as a view and then use it in queries like this: If there isn't, there is no point in using one instead of the other or in comparing their efficiency. By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service.

Id b ; The real question is of course which is more efficient.

sql server case when exists sql

You can't post new polls. The optimizer is pretty clever at understanding that all the queries would be equivalent but that also depends on the complexity of the queries. Id , convert bit,1 , convert bit,0 IsActive from A a; By the way, if you have any comments on the form of the queries, or general advice, please feel free to comment.

EXISTS (Transact-SQL)

Id; 2: You can't edit your own posts. You can't edit HTML code. You can't delete other topics. Sign up.

Post as a guest Name. All Rights Reserved. Hot Network Questions.