mysql - Search in a table based on multiple column value -


i have table, want filter data of table based on multiple column value whether type value of 1 column or more one.

i using code.

alter proc usp_getdata @name varchar(50)= null , @sector int =null,` `@pocket varchar(50) =null , @plot int =null , @locality varchar(50) =null select * m_details v_regname =@name , n_sector =@sector , v_pocket=@pocket , n_plotno=@plot , v_locality=@locality 

i want replace column value @name not null therefore result.

in procedure, replace bits v_regname =@name with

(@name null or v_regname = @name) 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -