c# winform 有两个条件的查询该如何写?
SqlConnectioncon=newSqlConnection(str2);con.Open();SqlCommandcmd=newSqlCommand("delet...
SqlConnection con = new SqlConnection(str2);
con.Open();
SqlCommand cmd = new SqlCommand("delete * from YiZhuList_Temp where MedName='" + medname+ "' and RecDate ='"+meddate+"'", con);
cmd.ExecuteNonQuery();
SqlCommand 这行 这样写报错:'*' 附近有语法错误。该如何写? 展开
con.Open();
SqlCommand cmd = new SqlCommand("delete * from YiZhuList_Temp where MedName='" + medname+ "' and RecDate ='"+meddate+"'", con);
cmd.ExecuteNonQuery();
SqlCommand 这行 这样写报错:'*' 附近有语法错误。该如何写? 展开
展开全部
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 列名称 = 值
是这样的吧
SqlCommand cmd = new SqlCommand("delete from YiZhuList_Temp where MedName='" + medname+ "' and RecDate ='"+meddate+"'", con);
语法是
DELETE FROM 表名称 WHERE 列名称 = 值
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询