[Solved] I am getting a SQL syntax error – how to fix it? [closed]


If this is SQL Server, you should use TOP instead of LIMIT.

select *  
from messages 
where date > (select top 1 lastinterval 
              from messageintervals 
              order by lastinterval desc)

1

solved I am getting a SQL syntax error – how to fix it? [closed]