This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nms-nmsweb/sql/sqlupdate(20130517-20130517).sql

63 lines
2.3 KiB
MySQL
Raw Normal View History

2018-09-27 16:21:05 +08:00
--
--detection_info_new
delete from detection_info_new din where din.detection_info_id in (
select t.id from detection_info t
where t.detection_state_info='监测成功(Random)' and t.performace_data='监测成功(Random)'
);
commit;
--detection_info_warning
delete from detection_info_warning din where din.detection_info_id in (
select t.id from detection_info t
where t.detection_state_info='监测成功(Random)' and t.performace_data='监测成功(Random)'
);
commit;
--
truncate table di_dpsystemfanentry;
commit;
--
truncate table di_dpsystempowerentry;
commit;
--
--select count(*) from di_system ds where ds.syslocation='Right here, right now.';
delete from di_system ds where ds.syslocation='Right here, right now.';
commit;
--di_switchport表 : DI_W201318seqId删除rownum删除
--281-2
--
select count(*) from di_switchport /*partition(DI_W201320)*/ t where /*t.seq_id=98 and */t.ifphysaddress='(Random)3c:e5:a6:02:4c:75' ;
--
select max(t.data_check_time) from di_switchport /*partition(DI_W201316)*/ t
where t.seq_id=500 and t.ifphysaddress='(Random)3c:e5:a6:02:4c:75';
delete from di_switchport /*partition(DI_W201320)*/ t
where /*t.seq_id=128 and*/ t.ifphysaddress='(Random)3c:e5:a6:02:4c:75' /*and rownum<100*/ ;
commit;
--detection_info
delete from detection_info /*partition(DI_W201313)*/ t
where /*t.seq_id=250 and*/ t.performace_data='监测成功(Random)'/* and rownum<100 */;
commit;
--
select count(*) from detection_info /*partition(DI_W201313)*/ t
where/* t.seq_id=132 and */ t.performace_data='监测成功(Random)';
select * from detection_info /*partition(DI_W201313)*/ t
where/* t.seq_id=132 and */ t.performace_data='监测成功(Random)';
select min(t.data_check_time) from detection_info /*partition(DI_W201313)*/ t
where /*t.seq_id=132 and*/ t.performace_data='监测成功(Random)';
--seqId查询
select nt.node_ip,nt.seq_id,nt.node_type from node_table nt where nt.node_type=1;