I am getting a syntax error in this SQL:
select *
from messages
where date > (select lastinterval from messageintervals
order by lastinterval desc
limit 1)
What is my mistake? Help me please
CodePudding user response:
If this is MSSQL
, you should use TOP
instead of LIMIT
.
select * from messages where date > (select TOP 1 lastinterval from messageintervals order by lastinterval desc)
CodePudding user response:
Can you post error that you are getting
CodePudding user response:
My Friend, ı am getting error bebo incorrect syntax near the keyword limit