How to select day 1 to last day in order for me to get dayname of all the days?
<pre><code>SET @variable1 = (SELECT DAY(LAST_DAY('2016-03-01')) as lastday);
SELECT @variable1 as last_day,
    DAYNAME(CONCAT('2016-03-',@variable1)) as day_name;
</code></pre>

<p>I am able to get the count of days which is 31 days for march, but how could I get from 1 to 31 the dayname?</p>

<p>in which select statement would show somehow like this:</p>

<pre><code>dayname | day count
tuesday      01
wednesday    02
....          ...
thursday      31
</code></pre>