1

I am having sqlite database.

In some columns I am having null values.

I want to replace null values with space..

Is there any query for this?

Please let me know

1 Answer 1

3

Use IFNULL. In a query:

SELECT IFNULL(mycolumn, ' ') FROM mytable

Or to change the data in the table:

UPDATE mytable SET mycolumn = IFNULL(mycolumn, ' ')

Alternatively:

UPDATE mytable SET mycolumn = ' ' WHERE mycolumn IS NULL
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.