Friday, 18 July 2014

Search data from sql database All data and with condition using single query


//Sql Query

declare @tt int
set @tt=0
select * from mstCombobox_T where (@tt<>0 and Flag=@tt) or (Flag<>0 and @tt=0)

//Output


declare @tt int
set @tt=12
select * from mstCombobox_T where (@tt<>0 and Flag=@tt) or (Flag<>0 and @tt=0)


//Output


No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...