I have a requirement where I need to check all the values of IN
clause exists in one column of SQL Server table or not.
How will I be able to find this?
I was trying something like this.
IF NOT EXISTS (
SELECT NULL
FROM workflow_attributes
WHERE attribute_name IN (
'Mukund_Test_1'
,'Mukund_Test_2'
,'Mukund_Test_3'
)
)
BEGIN
PRINT 'not exist'
END
ELSE
BEGIN
PRINT 'exists'
END