我有一个日期时间类型的列,我在存储过程中使用它,将两个局部变量声明为@From datetime and @To datetime,但是无论我做什么,我都会得到错误,或者它只是运行存储过程而不返回任何记录set @mySql ='
select * from abc where (MyDATE between '''+ cast(@From as datetime) +''' and '
我承认,我是一个MySQL的家伙,而不是一个MySQL的家伙,但我不太明白为什么我会收到这样的错误信息:
#1064 - You have an error in your SQL syntax; checkthe manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @