如何查看最近更新的数据的旧值? [英] How to see old value of a data that was recently updated?
问题描述
大家好,
我有一个问题,我已经想了很久了。我们里面有数据库表,行和数据。
让我们考虑一个简单的桌子来保存口袋里的物品。
$ b $bİtems_in_my_pocket
id item_name item_price
0手机$ 150
1钱$ 70
2 einac(开玩笑)$ 500,000
我想更新第2和第3行。我通过id决定行。
PseudeCode
将id = 2 set item_pice的行更新为$ 0。
将id = 3 set item_name的行更新为wallet,将item_pice更新为$ 20.
我怎么知道这些数据的旧值?如果我想创建一个日志面板,那么它将包含你更新 einac(开玩笑)到钱包
等等..
有哪些可能的解决方案?这是属于DBMS还是SQL还是代码本身(c#,java,php等)
谢谢。
Emre。
Hello everyone,
I have a question that I have thought for a long time. We have database tables, rows and data inside them.
Let's think about a simple table that keeps the items that in my pocket.
İtems_in_my_pocket
id item_name item_price
0 cellphone $150
1 money $70
2 einac(just kidding) $500,000
I want to update 2nd and 3rd row. I decide the row via id.
PseudeCode
Update the row that has id = 2 set item_pice to $0.
Update the row that has id = 3 set item_name to wallet and item_pice to $20.
How could I know the old values of these data? If I wanted to create a log panel, then it would
contain you updated einac(just kidding) to wallet
and so on..
What are the possible solutions? Does this belong to DBMS or SQL or the code itself(c#, java, php etc.)
Thanks.
Emre.
推荐答案
150
1钱
150
1 money
70
2 einac(只是开玩笑)
70
2 einac(just kidding)
500,000
我想更新第2和第3行。我通过id决定行。
PseudeCode
更新id = 2 set item_pice to
500,000
I want to update 2nd and 3rd row. I decide the row via id.
PseudeCode
Update the row that has id = 2 set item_pice to
这篇关于如何查看最近更新的数据的旧值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!