0

Hi and thanks for your help,

I am really new to SQL, so I kindly ask your help.

I did my research, but so far I have not been able to find a solution.

I have a partiality populated column is my Sqlite database.

Some fields are empty, some contain a number.

I need to populate only the empty fields with the number 60000.

Thank for ant help

3 Answers 3

1

Try this :-

Update tablename SET number = 60000 where field IS NULL

Sign up to request clarification or add additional context in comments.

1 Comment

@HSQL Please format code in your answer.
1

Try something like this:

update t
    set col = 60000
    where col is null;

That is, you can add a where clause to the update statement to limit the rows that are affected.

Comments

1

Try using UPDATE with WHERE columnname IS NULL

UPDATE yourtable
   SET yourcolumn = 60000
 WHERE yourcolumn IS NULL

SQLFiddle

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.