使用此SQL语法时收到错误

时间:2018-07-23 06:35:00

标签: c# user-interface

I have a problem regarding to the SQL Syntax that I used. I received a error it tells that the syntax that I used is not right to my MariaDB server version. My XAMPP is v3.2.2 while my MS Visual Studio is 2010. Do you think that the problem is my xampp version or my query? I add photos below.

string sql = "SELECT MemberID FROM Member WHERE MemberID LIKE @id";
sql = sql = "ORDER BY MemberID DESC Limit 1";

1 个答案:

答案 0 :(得分:1)

密印。应该是:

sql = sql + " ORDER BY MemberID DESC Limit 1";