本文介绍了要观看已经过更改的SQL列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在表中查看sql列,最近使用上次修改日期更改了 你可以帮我查询最新的更改。 原始表:
I need to watch sql columns in table, which has been recently changed with out using last modified date Could you help me to sql query for latest changes. original table:
S.No Employee id First Name Last Name Address 1 1 00007 J Siva East st 2 020007 G Moorthy West street 3 300007 gan thanu East st 4 100007 esh Moor West street修改后的表格
modified table
S.No Employee id First Name Last Name Address 1 1 00007 Jun Siva East st 2 020007 Gon Moorthy West street 3 300007 gan thanu East st 4 100007 esh Moor West streetso我只需要获取2行以下。
so i need to fetch only below 2 rows.
S.No Employee id First Name Last Name Address 1 1 00007 Jun Siva East st 2 020007 Gon Moorthy West street我的尝试:
What I have tried:
original table: <pre> S.No Employee id First Name Last Name Address 1 1 00007 J Siva East st 2 020007 G Moorthy West street 3 300007 gan thanu East st 4 100007 esh Moor West street修改后的表格
modified table
S.No Employee id First Name Last Name Address 1 1 00007 Jun Siva East st 2 020007 Gon Moorthy West street 3 300007 gan thanu East st 4 100007 esh Moor West street所以我只需要获取2行以下。
so i need to fetch only below 2 rows.
S.No Employee id First Name Last Name Address 1 1 00007 Jun Siva East st 2 020007 Gon Moorthy West street解决方案
不确定我是否理解你的问题。但是,如果你有两个表,修改过的和原始的,你可以使用EXCEPT运算符 例如 Not sure if I understand your question correctly. But if you have both tables, the modidied and the original, you can perhaps use EXCEPT operator For example SELECT SNo, EmployeeId, FirstName,LastName, Address FROM ModifiedTable EXCEPT SELECT SNo, EmployeeId, FirstName,LastName, Address FROM OriginalTable
如果您没有使用一行时间戳定义表,则无法这样做...... If you hadn't defined your table with a row of timestamp there is no way to do it...
更多推荐
要观看已经过更改的SQL列
发布评论