declare @start datetime
declare @end datetime
set @start = '2018-01-25'
set @end = '2018-02-03'
select dateadd(dd,num,@start)
FROM (SELECT ROW_NUMBER() OVER (ORDER BY ID)-1 AS num FROM sysobjects) KK
where dateadd(dd,num,@start) <=@end
勇敢的打工人(提问者)1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'declare @start datetime
这个问题是?
勇敢的打工人(提问者)> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'DECLARE @StartTime DATE = \'2019-03-08\', -- 开始时间
@EndTime DATE\' at line 2