select * from pi_incident t
update pi_incident tt set tt.x=tt.shape.minx 将空间坐标赋值给X,Y
查找表字段 desc pi_onecall(表名) 新建command window
删除 整个表内容 delete pi_onecall(表名)
desc pi_attachment
删除表 drop table pi_attachment1
给pi_attachment赋值OBJECTID
SQL> alter table pi_attachment add objectid INTEGER;
Table altered
SQL> update pi_attachment set objectid=objectid.nextval;
1943 rows updated
SQL> commit;
去除一列中的含空格的语句。
update pi_attachment tt set tt.attachrefid=RTRIM(tt.attachrefid,' ')
统计记录条数
select count(*) from er_attachment
select objectid from pi_attachment t order by t.objectid
update pi_attachment t set t.objectid=t.objectid-23500
select objectid.nextval from dual
查找slopeid非空的值
select * from pi_incident t where slopeid is not null for update
更新记录,如果EVENTID能够对应,那么将DEVICEID赋值成1542f798266503820126653b86df00d3
update cp_test_wharfanode set DEVICEID='1542f798266503820126653b86df00d3 ' where eventid='7aed1398513c4a659f5de50858ceec4e '; |
将表CP_ATTACHMENT记录插入到pi_attachment语句
insert into pi_attachment(attachid,attachreftype,attachrefid,attachtypeid,attachpartoftypeid,attachfilename,attachsuffixname,attachdescription,attachcreatedate,attachcreater,attachcontent,objectid) select t.attachid,t.attachreftype,t.attachrefid,t.attachtypeid,t.attachpartoftype,t.attachfilename,t.attachsuffixname,t.attachdescription,t.attachcreatedate,t.attachcreater,t.attachcontent,t.objectid from CP_ATTACHMENT t;