//删除----------------------------------------------------------------------------------------------
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} 条数据已删除!");
}
删除成功