Home > database >  Pray god help a look
Pray god help a look

Time:09-16


@ Query where the if (value="HTTP://https://bbs.csdn.net/topics/select * from XXX (? 1! X1=,='? 1, 1=1) and the if (? 2!=' ', x2=? 2, 1=1) + "
"And if (? 3! The x3=,='? 3, 1=1), "nativeQuery=true)
List Find (String X1, String X2, String X3);
This statement can be used on mysql, oracle missing right parenthesis will be shown, however, could you tell me how to change can be implemented in oracle?

CodePudding user response:

Where the if (? 1! X1=,='? 1, 1=1)

In order to realize what is this?

CodePudding user response:

Select * from XXX where NVL (? 1, the X1)=X1 AND NVL (? 2, X2)=X2 AND NVL (? 3 X3)=X3 like this?

CodePudding user response:

Whether the parameter passed is empty, if is empty let him show 1=1 or don't show, no empty, added to the condition judgment

CodePudding user response:

reference 1st floor selling fruit net reply:
where the if (? 1! X1=,='? 1, 1=1)

In order to realize what is this?

Whether the parameter passed is empty, if is empty let him show 1=1 or don't show, no empty, added to the condition judgment

CodePudding user response:

refer to the second floor ZJHZ_ leaf response:
select * from XXX where NVL (? 1, the X1)=X1 AND NVL (? 2, X2)=X2 AND NVL (? 3 X3)=X3 like this?

It may not seem like the right -!
  • Related