search

Home  >  Q&A  >  body text

Solving query problem: How to get all the results from the Customers table and replace the null values ​​in the Status and Fax columns with empty strings?

I am very confused about this question. The problem is that I know I can use the COALESCE function, but how? Because there are two columns here, State and Fax.

P粉726234648P粉726234648261 days ago525

reply all(1)I'll reply

  • P粉262073176

    P粉2620731762024-04-02 10:53:13

    You can use if null

    select id,ifnull(state, '') as state ,ifnull(fax, '') as fax from customer

    reply
    0
  • Cancelreply