i my table i have 10 rows with RoleId .i want to check all 10 rows RoleId is '00000000-0000-0000-0000-000000000000' then i want to return true else false in select query
Select Query -empty guid
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pasang TamangRank #449 · 5.6K reputationPosted Dec 29, 2022, 6:26 AM EST
Hi,
You can use CASE statement to achieve the result. Below code example shows how to use CASE statement,
SELECT CASE WHEN RoleId = CAST(0x0 AS UNIQUEIDENTIFIER) THEN 'True' ELSE 'False' END as Result FROM [dbo].[tblRole]Regards,
Pasang
Aravind GovindarajRank #430 · 5.8K reputationPosted Dec 29, 2022, 6:27 AM EST
please refer to this link
https://stackoverflow.com/questions/24708109/sql-filter-rows-with-max-value
or else you can create a function and check MaxRow vs Filter Row if both are the same then true else false.