Windows 窗体
一组用于开发图形用户界面的 .NET Framework 托管库。
113 个问题
string query = "SELECT e.employeeId, e.firstName, e.lastName, e.position, e.contactNumber, el.email, el.password FROM employee e JOIN employeeLogin el ON e.employeeId = el.employeeId Where e.firstName LIKE @searchName% OR e.lastName LIKE @searchName% ";
cmd = new SqlCommand(query, _IsqlDataFunctions.GetConnection());
cmd.Parameters.AddWithValue("@searchName", txtAdminSearchName.Text);
我收到错误 - “关键字 OR 附近的语法不正确”
我尝试在“@searchName%”周围加上撇号,但什么也没返回
Note:此问题总结整理于: Can someone please tell me what is wrong with the following sql query that im trying to execute?