在这里,我对存储过程感到困惑。在这里,我们将所有与数据库相关的操作应用到代码中:
string query = "insert into accounts(name, opening_balance, category, address, contact_person, phone_number) values("
+ "'" + account.Name + "',"
+ account.OpeningBalance + ","
+ account.Category.Id + ","
+ "'" + account.Address + "',"
+ "'" + account.ContactPerson + "',"
+ "'" + account.PhoneNumber + "')";
account.Id = SQLiteHelper.ExecuteInsert(query);
我们可以在存储过程中应用它吗?如果是这样:如何?存储过程比它有什么优势?