java - Counting entries in mysql which are not equal to something -


i making code count entries in database in column's default value specified me. in front end, user can change value of column random alphanumeric number. have count how many entries has user changed. tried following code(s) in jdbc while linking mysql it:

select * complaints rid=11120059 permanent_token !='0'; select * complaints rid=11120059 not permanent_token ='0'; 

but none working. giving default value of varchar permanent_token '0'.

there 2 mistakes in requests.

  • first, use twice keyword where
  • second, when want not equals in sql have use <>

for exemple, first request: select * complaints rid=11120059 , permanent_token <>'0';

and have count result: select count(*) complaints rid=11120059 , permanent_token <>'0';


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -