display day through stored procedure
问题 I have an problem in MySQL stored procedure table tbl_teachers : id dat_teacher_doj fk_int_dept_id 1 1982-01-10 1 2 1979-09-01 1 3 1981-10-13 1 here i need to create an stored procedure to find out the joining date of teachers and if it is a Monday it should display Monday else it should display “Weekday” ? i need the answer like: call check-date (1982-01-10) ->day weekday 回答1: just CASE expression with the help of DAYNAME SELECT id, dat_teacher_doj, CASE DAYNAME(dat_teacher_doj) WHEN 'Monday