要观看已经过更改的SQL列

编程入门 行业动态 更新时间:2024-10-09 10:26:54
本文介绍了要观看已经过更改的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 street

so我只需要获取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列

本文发布于:2023-10-23 02:46:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519517.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!