Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Bedingte Bedingungen in SQL Server

DECLARE @status varchar(15)

--set the status

SELECT * 
FROM tbl_Location
WHERE Status = @status OR @status = 'ALL'