Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8122393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:49:21+00:00 2026-06-06T05:49:21+00:00

so in my database some rows have NULL values, and when I select *

  • 0

so in my database some rows have NULL values, and when I select * from table, that NULL values also shows as text “null”. So I want to hide all NULL values. Does anyone have idea for query? Thanks!

this is my input in DB:

db.execSQL("CREATE TABLE IF NOT EXISTS table (name VARCHAR, kg VARCHAR,   pod                 VARCHAR,reps VARCHAR, time VARCHAR );");
  db.execSQL("INSERT INTO table VALUES('name 1',NULL,NULL , NULL , '"+s+"');");
 db.execSQL("INSERT INTO table VALUES(NULL,'S 1','"+ee5+"' , '"+ee+"' , '"+s+"');");
 db.execSQL("INSERT INTO table VALUES(NULL,'S 2','"+ee6+"' , '"+ee2+"', '"+s+"');");
 db.execSQL("INSERT INTO table VALUES(NULL,'S 3','"+ee7+"' , '"+ee3+"', '"+s+"');");
 db.execSQL("INSERT INTO table VALUES(NULL,'S 4','"+ee8+"' , '"+ee4+"', '"+s+"');");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:49:22+00:00Added an answer on June 6, 2026 at 5:49 am

    This is what you are looking for:

    SELECT x, y, etc, CASE WHEN field IS NOT NULL THEN field ELSE '' END AS hehe FROM table;
    

    Edit: Addin to your comments, this is pretty trivial once you know how to do it for one column. Apply the same for all columns. In SO dont expect homeworks to get done, instead expect a help to solve your problem which ultimately you yourself have to do.

    Btw, here is how..

    SELECT COALESCE(name, ''), COALESCE(kg, ''), COALESCE(pod, ''), COALESCE(reps, ''), 
           COALESCE(time, '') 
    FROM   table
    

    You have three good methods in this thread (including mine), and I personally feel the other two are more intuitive. Use any by applying the same logic as I have shown.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a nutshell: I have some database table data that I want to populate
How do I can select some records on database skipping a number o rows
I'm working some code that inserts csv rows into an SQLite database using Python.
I have a DATETIME value some_date that can be null in my database. When
I have rows in a contact details database that look like this: contactID -
I have a table where I wish to update some of the rows. All
I have over a million rows in an SQLServer2005 database, with a text column
I have a web from that has a few text boxes which are visible
Just trying to get some rows out of a database and loop through but
I'm using an XMLHttpRequest for inserting some rows to a MYSQL database. I defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.