Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Create Procedure SearchPeople
@Name VarChar(100) = NULL,
@EyeColor VarChar(20) = NULL,
@ShowSize Numeric(3,1) = NULL
As
SET NOCOUNT ON
Select *
From People
Where (@Name Is NULL OR Name = @Name)
And (@EyeColor Is NULL OR EyeColor = @EyeColor)
And (@ShoeSize Is NULL OR ShoeSize = @ShoeSize)
declare @value1 int
set @value1=1
select *
from table1
where 0 = 0
AND (@Value1 Is NULL Or ColumnA = @Value1)
Declare @People Table(Name VarChar(20), EyeColor VarChar(20))
Insert Into @People Values('George','Brown')
Insert Into @People Values('Qik3Coder',NULL)
Declare @EyeColor VarChar(20)
Set @EyeColor = NULL
Select *
From @People
Where (@EyeColor Is NULL Or EyeColor = @EyeColor)
Select *
From @People
Where EyeColor = Case When @EyeColor Is Not NULL Then @EyeColor Else EyeColor End