clement
clement

Reputation: 4266

Append in SQL When field is NULL

i'm trying to make one append when my field is NULL (NULLABLE field), but it didn't work...

UPDATE YourTable
    SET YourColumn = YourColumn + 'Appended Data'

Thanks in advance for your help

Upvotes: 2

Views: 67

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269843

Use coalesce():

UPDATE YourTable
    SET YourColumn = COALESCE(YourColumn, '') + 'Appended Data';

Upvotes: 1

Related Questions