Android SQLite query where column is not null and not empty

后端 未结 2 1443
-上瘾入骨i
-上瘾入骨i 2021-02-04 05:09

I cannot figure out the syntax for the .query call. I need to select all records that match a certain column that do not have a null or empty value for a second (different) colu

相关标签:
2条回答
  • 2021-02-04 05:37

    If multiple spaces can be in your column and you also want to treat them as empty values use TRIM

    column_name IS NOT NULL AND TRIM(column_name," ") != ""
    
    0 讨论(0)
  • 2021-02-04 05:44

    I believe the correct syntax would be:

    AND key IS NOT NULL AND key != ""
    

    where key is your column

    0 讨论(0)
提交回复
热议问题