/*通过DOS导出导入数据*/
EXP hbean_data/hbean_data@10.60.1.156:1521/orcl file=E:hbean_data.DMP
IMP hbean_data/hbean_data@orcl file=E:\hbean_data.DMP full=y
/*清空表数据*/
delete from tablename
/*复制列数据*/
update tablename set create_user = lrr,create_time = lrsj,create_dept = lrdw;
/*删除主键*/
alter table tablename drop constraint prikeyName;
/*添加主键*/
alter table tablename add constraint prikeyName primary key(id);
/*查询表中id重复的数据*/
select id from tableName group by id having count(*) > 1;
/*复制表数据 新表已经存在时使用这个方法*/
insert into newTable(field1,field2,...)
select field1,field2,...
from oldTable
/*截取字符串 注:开始位置和结束位置都是闭区间 */
select substr(strColumn,beginIndex,endIndex) from tableName ;
/*获取字符串位置 */
select instr(strColumn,char) from tableName ;
/*合并列数据:wm_concat(列值)函数:该函数把列值用逗号分割,并显示成一行*/
select wm_concat(column) from tableName ;