How to execute query based on passed operators <,= by param using Stored Procedures?
I have a stored procedure(SP) where one of it's param passes the operator.
The operator can be:<=
, >=
, =
How can I use this in the query?
How the operators are passed is not built yet, it can be string represented <=
or by using a custom code 1
, 2
or 3
. What 开发者_如何学Cdo you think?
I think you're doing something strange.
However, you can pass the operator as a string, and use it inside your SP to create a prepared statement.
精彩评论