1、查找用户表
- select table_name,num_rows from all_tables where OWNER="TIGER" AND TABLE_NAME like "%MASTER"
- order by num_rows desc
2、查找用户表字段
- select * from user_tab_columns
- where DATA_TYPE="CHAR" and DATA_LENGTH=119
- and Table_name=upper("TYIMBLMASTER")
3、查找重复字段,去掉count函数则取出记录
- select count(*) from sys_data
- where trxref in (select trxref from sys_data group by trxref having count(trxref) > 1)
- --或
- select sum(n) from (select trxref,count(trxref) as n from sys_datas group by trxref having count(trxref) > 1)
4、查找不重复的记录
- select count(trxref) from (select trxref,count(trxref) as n from sys_data group by trxref having count(trxref) > 1)
5、查找多余的重复记录
- select count(*) from sys_data
- where trxref in (select trxref from sys_datas group by trxref having count(trxref) > 1)
- and rowid not in (select min(rowid) from sys_data group by trxref having count(trxref)>1)
6、删除多余的重复记录
- delete from sys_data
- where trxref in (select trxref from sys_data group by trxref having count(trxref) > 1)
- and rowid not in (select min(rowid) from sys_data
将shpfiles导入Oracle数据库的方法MySQL数据库在Linux操作系统上的安装及容易出现的问题相关资讯 Oracle基础教程
- Oracle块编程返回结果集详解 (11/10/2013 10:45:58)
- Oracle基础教程之设置系???全局区 (08/22/2013 14:24:00)
- Oracle基础教程知识点总结 (06/18/2013 07:43:32)
| - Oracle基础教程之tkprof程序详解 (10/22/2013 11:49:50)
- Oracle基础教程之sqlplus汉字乱码 (07/18/2013 16:30:00)
- Oracle 管理之 Linux 网络基础 (02/16/2013 18:37:35)
|
本文评论 查看全部评论 (0)