I have the following scenario
+--------+--------+-----------------+-------------------------+
| Msgid |UserID | Msg | MsgDate |
+--------+--------+-----------------+-------------------------+
| 3 | 75 | TextMSG | 2014-04-01 12:05:29.957 |
| 4 | 75 | TextMSG | 2014-04-01 12:06:14.967 |
| 5 | 75 | TextMSG | 2014-04-01 12:06:48.160 |
| 6 | 80 | TextMSG | 2014-04-01 12:07:02.227 |
| 7 | 80 | TextMSG | 2014-04-01 12:07:07.763 |
+--------+---------+-------+----------------------------------+
and write the query to retrieve the 2 recent msg of User id 75.
SELECT Msg FROM TempNoti WHERE UserID = 75 LIMIT 2 ORDER BY MsgDate DESC;
But it gives the following error
Incorrect syntax near 'LIMIT'.
I using the tutorial from this site
mysqltutorial.