Test using parameters for unary minus and unary plus insert into t1 values(?,+?,-?,?) ? parameter type is INTEGER unary +? parameter type is SMALLINT unary -? parameter type is DOUBLE select * from t1 where -? in (select c21 from t2) unary -? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select * from t1 where c11 = -? and c12 = +? and c13 = ? unary -? parameter type is INTEGER unary +? parameter type is SMALLINT ? parameter type is DOUBLE C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} C11,C12,C13,C14 --- --- --- --- {-1,-1,-1.0,def} select * from t1 where -? = ABS_FUNCT(+?) unary -? parameter type is INTEGER unary +? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select * from t1 where -? = max_cni(-5,-1) unary -? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select * from t1 where -? = max_cni(-?,+?) unary -? parameter type is INTEGER unary -? parameter type is INTEGER unary +? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} Try the function again. But use, use sqrt(+?) & abs(-?) functions to send params select * from t1 where -? = max_cni(abs(-?), sqrt(+?)) unary -? parameter type is INTEGER unary -? parameter type is DOUBLE unary +? parameter type is DOUBLE C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select * from t1 where c11 between -? and +? unary -? parameter type is INTEGER unary +? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} select * from t1 where +? not in (-?, +?, 2, ?) unary +? parameter type is INTEGER unary -? parameter type is INTEGER unary +? parameter type is INTEGER ? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select * from t1 where +? < c12 unary +? parameter type is SMALLINT C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} select * from t1 where -? = c11 + ? unary -? parameter type is INTEGER ? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {-1,-1,-1.0,def} select * from t1 where c11 + ? = -? ? parameter type is INTEGER unary -? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {-1,-1,-1.0,def} select * from t1 where c11 + c12 = -? unary -? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {-1,-1,-1.0,def} select * from t1 where -? not in (select c21+? from t2) unary -? parameter type is INTEGER ? parameter type is INTEGER C11,C12,C13,C14 --- --- --- --- {1,1,1.1,abc} {-1,-1,-1.0,def} select cast(-? as smallint), cast(+? as int) from t1 unary -? parameter type is SMALLINT unary +? parameter type is INTEGER 1,2 - - {-2,2} {-2,2} select nullif(-?,c11) from t1 unary -? parameter type is INTEGER 1 - {-22} {-22} select sqrt(-?) from t1 unary -? parameter type is DOUBLE 1 - {8.0} {8.0} select * from t1 where c11 = any (select -? from t2) SQL State : 42X34 Got expected exception There is a ? parameter in the select list. This is not allowed. Negative test - -?/+? at the beginning and/ at the end of where clause select * from t1 where -? and c11=c11 or +? SQL State : 42X19 Got expected exception The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'PARAMETER' expression. It must be a BOOLEAN expression. Negative test - -?/+? in like escape function select * from sys.systables where tablename like -? escape +? SQL State : 42X37 Got expected exception The unary '-' operator is not allowed on the 'VARCHAR' type. Negative test - -?/+? in binary timestamp function select timestamp(-?,+?) from t1 SQL State : 42X37 Got expected exception The unary '-' operator is not allowed on the 'DATE' type. Negative test - -? in unary timestamp function select timestamp(-?) from t1 SQL State : 42X36 Got expected exception The 'timestamp' operator is not allowed to take a ? parameter as an operand. Negative test - -? in views create view v1 as select * from t1 where c11 = -? SQL State : 42X98 Got expected exception Parameters are not allowed in a VIEW definition. Negative test - -? in inner join select * from t1 inner join t1 as t333 on -? SQL State : 42X37 Got expected exception The unary '-' operator is not allowed on the 'BOOLEAN' type. Negative test - -? by itself in where clause select * from t1 where -? SQL State : 42X19 Got expected exception The WHERE or HAVING clause or CHECK CONSTRAINT definition is a 'PARAMETER' expression. It must be a BOOLEAN expression. Negative test - -? is null not allowed because is null allowed on char types only select * from t1 where -? is null SQL State : 42X37 Got expected exception The unary '-' operator is not allowed on the 'VARCHAR' type. select case when -?=c11 then -? else c12 end from t1 unary -? parameter type is INTEGER unary -? parameter type is SMALLINT 1 - {1} {-22} Negative test - unary plus parameters on both sides of / operator select * from t1 where c11 = ?/-? SQL State : 42X35 Got expected exception It is not allowed for both operands of '/' to be ? parameters. Negative test - unary plus in || operation select c11 || +? from t1 SQL State : 42X37 Got expected exception The unary '+' operator is not allowed on the 'VARCHAR' type. Negative test - unary minus for char column select * from t1 where c14 = -? SQL State : 42X37 Got expected exception The unary '-' operator is not allowed on the 'CHAR' type. Negative test - unary plus for char column select * from t1 where c14 like +? SQL State : 42X37 Got expected exception The unary '+' operator is not allowed on the 'CHAR' type.