HI ALL,
How the query give the result.
select * from Branch
Table data is
DENABANK1
1900-01-01 00:00:00.000
ANDHRABANK2
1900-01-01 00:00:00.000
ICICIBANK 3 1900-01-01 00:00:00.00
--1--
declare @n varchar(20)
set @n='denabank'
select *
from Branch
where (Name=@n or @n='ALL')
O/p is
DENABANK1 1900-01-01 00:00:00.000
--2--
declare @n varchar(20)
set @n='all'
select *
from Branch
where (Name=@n or @n='ALL')
o/p
DENABANK1
1900-01-01 00:00:00.000
ANDHRABANK2
1900-01-01 00:00:00.000
ICICIBANK3
1900-01-01 00:00:00.000
How it show all the records.
Please help me.
Regards,
S.Krishna.