SQL: Return “true” if list of records exists?

后端 未结 14 802
情深已故
情深已故 2020-12-28 12:49

An alternative title might be: Check for existence of multiple rows?

Using a combination of SQL and C# I want a method to return true if all products in a list exist

14条回答
  •  执笔经年
    2020-12-28 13:16

    You can use a SELECT CASE statement like so:

    select case when EXISTS (
     select 1 
     from 
     where 
     ) then TRUE else FALSE end
    
    
    

    It returns TRUE when your query in the parents exists.

    提交回复
    热议问题