SQL Server Subquery a

You need to use an exists here in your conditional check. Most likely something like this. Without more details it is impossible to know what you are trying to do.

if EXISTS(
select MAX(DonGia) 
from inserted
having MAX(DonGia) >= (select MIN(DonGia) * 1.2 from inserted)
)

Leave a Comment