select
编号,
case when A表姓名<>B表姓名 then '姓名不同' else A表姓名 end '类别一',
case when A表时间<>B表时间 then '时间不同' else A表时间 end '类别二',
A表时间,
B表时间
from table需要将姓名和时间的不同作同一个'类别'么?
编号,
case when A表姓名<>B表姓名 then '姓名不同' else A表姓名 end '类别一',
case when A表时间<>B表时间 then '时间不同' else A表时间 end '类别二',
A表时间,
B表时间
from table需要将姓名和时间的不同作同一个'类别'么?
若 A表时间<>B表时间 则显示“时间不同”,字段 A表内容,则显示 A表时间
-------------------------------------------
如A表姓名=B表姓名,则如何?
如 A表时间=B表时间,则又如何呢?
2,再来建1新表,专门用来分类 用一循环对上表中的数据进行比较,将不同的数据写入新表中即可