问题描述
我有一个有这种结构的表格,我想在星期名称上显示记录基础,即星期一在第一个位置,星期二在第二个位置...所以星期日在最后一个位置因此我需要将星期一改为第一个,星期日将持续
1周日00:30:00.000 19:30:00.000
2周一01:30: 00.000 17:01:00.000
3星期二23:00:00.000 00:30:00.000
4星期三01:00:00.000 15:54:00.000
5星期四00:00:00.000 00:00:00.000
6星期五00:00:00.000 22:00:00.000
7星期六00:00:00.000 21:30:00.000
我尝试过:
选择Id,Name ,StartDate,Enddate from record Order by Id
I have a table with this structure , I want to show record basis on weeks name i.e. monday on first position, tuesday on second ...so on sunday on last position So I need to change monday to first and sunday will last
1 Sunday 00:30:00.000 19:30:00.000
2 Monday 01:30:00.000 17:01:00.000
3 Tuesday 23:00:00.000 00:30:00.000
4 Wednesday 01:00:00.000 15:54:00.000
5 Thursday 00:00:00.000 00:00:00.000
6 Friday 00:00:00.000 22:00:00.000
7 Saturday 00:00:00.000 21:30:00.000
What I have tried:
select Id, Name , StartDate, Enddate from record Order by Id
这篇关于将第二行移动到第一行,然后在SQL中按照相同的顺序执行所有记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!