如何用 pl/sql消除数据库中表的数据冗余?

cdwy411 2003-12-08 05:50:42
一个数据库中有上万个表,其中有些表中可能会有有些行的数据是相同的
在sql 中基本一个 distinct 就可以解决掉,但是不知道在pl/sql中或
oci等程序设计中如何实现?
在pl/sql中如何通过程序依次访问数据库中的表???
...全文
55 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
doer_ljy 2003-12-09
  • 打赏
  • 举报
回复
btw:
search 'dynamic sql' in oracle's handbook
you can find the sample in detail.
doer_ljy 2003-12-09
  • 打赏
  • 举报
回复
use dynamic sql
such as (just a sample):
type curtype is ref cursor;
curname curtype;
str := 'select * from tablename';
open cursorname for str;
loop
fetch aaa into rowtype_var;
end loop;

cdwy411 2003-12-09
  • 打赏
  • 举报
回复
关键是我必须在程序中依次读 一个数据库中的各个表
在pl/sql中该如何实现呢?
phiai 2003-12-08
  • 打赏
  • 举报
回复
一样,都可以使用distinct,只要sql语句写对了就行。
jiezhi 2003-12-08
  • 打赏
  • 举报
回复
use sql statement can do.
you can also use 'distinct ' in oracle

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧