mysql - How do i correct this query? -
i have mysql query looks this:
select column1_value, column2_value some_table column2_value in (a,lot,of,comma,separated,values) , column1_value not in (select column1_value, column3_value some_table column3_value = some_number) order desc limit 4
but maintain getting error, wrong?
can't in , not in?
thanks in advance
the problem line
and column1_value not in (select column1_value, column3_value some_table column3_value = some_number)
notice inner subquery?
select column1_value, column3_value some_table column3_value = some_number
you returning 2 columns in data-set! should be
select column1_value some_table column3_value = some_number
or whatever (single!) column want test against.
mysql
No comments:
Post a Comment