mysql - SQL select distinct rows and ignore row if blank -


i using sql query fetch rows table. want select rows distinct values , if there no value entered row, row should not there.

select distinct meta_value `wp_postmeta` meta_key = "aaa"; 

this query using, getting distinct rows query getting blank row.

simple solution:

select distinct meta_value  `wp_postmeta`  meta_key = "aaa" , meta_value != ""; 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -