创建一个视图,该视图列出在周一,周二,周三或周四开始预订的来宾。包括以下列:
•完全说明了星期几(例如星期一)
CREATE VIEW V_Guest_1
AS
SELECT CONCAT(last_name,',',first_name) AS Guest_Name,
DATE_FORMAT(check_in_date,'%m/%d/%Y')AS check_in_date,
DATE_FORMAT(check_in_date,'%w') AS Day_Name
FROM viewreservations
ORDER BY DATE_FORMAT(check_in_date,'%w'),last_name,first_name;
答案 0 :(得分:0)
这些都应该在MySQL中起作用以输出日期名称。 (大写W使其为非数字)
DAYNAME(check_in_date)
DATE_FORMAT(check_in_date,'%W')