MariaDB replace 0 | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

MariaDB replace 0

Are there opportunities for rules to replace 0 value by values of another dataset? That before eg?

3rd Nov 2022, 7:13 AM
Oma Falk
Oma Falk - avatar
2 ответов
+ 3
The question is not quite clear. MariaDB syntax is very similar to Mysql. Do you want to show a different value when querying tables (SELECT)? If so, you can JOIN another table and use a CASE operator in your query. If you want to replace NULL values, you can also take advantage of IFNULL and COALESCE functions. Or you want to change the value when it is inserted into a table? Then a TRIGGER can help you.
3rd Nov 2022, 8:59 AM
Tibor Santa
Tibor Santa - avatar
+ 3
Thanks Tibor Santa ! A set of opportunities is always 👌
3rd Nov 2022, 1:44 PM
Oma Falk
Oma Falk - avatar