C# 想删除别人在textbox2,textbox3..上输入的sql数据,怎么写?

来源:百度知道 编辑:UC知道 时间:2024/05/22 08:21:52
"delete * from majinqi where (name,birth,location,home,ps)='" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "'";
这样对不对?请告知下,该怎么改

"delete from majinqi where name='" + textBox2.Text +
"' and birth=,'" + textBox3.Text +
"' and location=,'" + textBox4.Text +
"' and home='" + textBox5.Text +
"' and ps='" + textBox6.Text + "';"
***********
补充:
SQL中delete语法:
delete from table_name where xxxx=xxxx and xxxx=xxxx and xxxx=xxxx...
***********
---
以上,希望对你有所帮助。

哪里需要那么多 有个主键就可以了。而且语法好像是where xxxx=xxxx and xxx=xxx and