Avatar of mousemat24
mousemat24

asked on 

How to display all rows even if you dont enter a parameter

I have this SQL

SELECT     SupplierID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax, HomePage
FROM         Suppliers
WHERE     (Country = @Country)

... note, its not a SP

I want to display ALL rows if a user does not enter a @Country. Can someone please help me with this.

thanks
Microsoft SQL ServerMicrosoft SQL Server 2005Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Guy Hengel [angelIII / a3]

8/22/2022 - Mon