C# SQL 关键字 between 附近有语法错误

2024-12-26 00:05:59
推荐回答(3个)
回答1:

sql语句错误,where前面缺少空格,把语句改为:
comm.CommandText = "select * from "+Tablename+" where Row between 2 and 3";

回答2:

comm.CommandText = "select * from "+Tablename+" where Row between 2 and 3";
where 前面加空格

回答3:

你把你的sql语句输出来看看, 是不是表名和where连起来了。