mysql>
mysql> CREATE TABLE weekday
-> (
-> day ENUM('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')
-> );
Query OK, 0 rows affected (0.01 sec)
mysql>
mysql> INSERT INTO weekday (day) VALUES('Monday'),('Friday'), ('Tuesday'), ('Sunday'), ('Thursday'), ('Saturday'), ('Wed
nesday');
Query OK, 7 rows affected (0.00 sec)
Records: 7 Duplicates: 0 Warnings: 0
mysql>
mysql>
mysql> SELECT day, day+0 FROM weekday ORDER BY day;
+-----------+-------+
| day | day+0 |
+-----------+-------+
| Sunday | 1 |
| Monday | 2 |
| Tuesday | 3 |
| Wednesday | 4 |
| Thursday | 5 |
| Friday | 6 |
| Saturday | 7 |
+-----------+-------+
7 rows in set (0.00 sec)
mysql>
mysql> drop table weekday;
Query OK, 0 rows affected (0.00 sec)