邵老师说的博客现已知有一个表T2(id,code,date)需从T1表中取得相应数据。使用oracle的存储过程方法。如果用sql语言实现大致逻辑是这样的:insert into T2(id,code,date) select (t.id,t.code,t.date) from T1 t where t.date=to_...
一棵树7351的博客student表中数据如下: 需要找出name相同,score不同的数据,sql如下: SELECT a.name,a.score from student a,student b where a.name = b.name and a.score != b.score GROUP BY a.name, a.score 结果如下: ...