c# winform 有两个条件的查询该如何写?

2024-11-25 06:21:08
推荐回答(2个)
回答1:

SqlCommand cmd = new SqlCommand("delete * from YiZhuList_Temp where MedName='" + medname+ "' and RecDate ='"+meddate+"'", con);

是这样的吧
SqlCommand cmd = new SqlCommand("delete from YiZhuList_Temp where MedName='" + medname+ "' and RecDate ='"+meddate+"'", con);

语法是
DELETE FROM 表名称 WHERE 列名称 = 值

回答2:

delete from 表名 where 条件 你的delete 语法错了