in the database there is a field of type Date yyyy-mm-dd , in oracle, I got mm using this code
SELECT nvl(substr(column_name, 4, instr(column_name,'.')-1),column_name) FROM table is there such a mysql
in the database there is a field of type Date yyyy-mm-dd , in oracle, I got mm using this code
SELECT nvl(substr(column_name, 4, instr(column_name,'.')-1),column_name) FROM table is there such a mysql
EXTRACT , MONTH functions. sql-tutorial.ru/ru/book/datepart_function/page2.html - getting the month.IFNULL is an analogue of NVL .
ifnull is a mysql specific function. There is a standard analogue supported by almost all DBMSs (including mysql and oracle): coalesce - Mikelike this: month (column_name)
Source: https://ru.stackoverflow.com/questions/507977/
All Articles