i need to pass a parameter to stored procedure to get all rows which data type of column is Bit .
example :
select * from user where active = true // get all actived users
select * from user where active = false // get all Not actived users
what can i do when i need to get all rows . i pass the active value as a parameter from C#
Use the
?to nullify your C#boolvalue:Pass the potentially null
showActiveflag and update your SQL code with this:If the
@showActiveparameter passed is null, all rows will be returned.