//删除----------------------------------------------------------------------------------------------
string sqldelete = " DELETE FROM bookshop WHERE 编号 = 6 ";
using (MySqlCommand command = new MySqlCommand(sqldelete, connection))
{
int rowsAffected = command.ExecuteNonQuery();
Console.WriteLine("\n");
Console.WriteLine( "\n" +$"{rowsAffected} 条数据已删除!");
}
删除成功
标签:MySqlCommand,Console,删除,VS2022,WriteLine,MySQL,rowsAffected From: https://www.cnblogs.com/hox6/p/17647669.html