随笔分类 -  sql

摘要:begin for cur_dept in (select SLCATALOG_ID from T_GIS_SLCATALOG) loop UPDATE T_GIS_SLCATALOG SET PATH = (SELECT listagg(SLCATALOG_ID, ',') WITHIN GROU 阅读全文
posted @ 2017-01-18 15:30 忆如梨花 阅读(297) 评论(0) 推荐(0)
摘要:当sql文件的数据比较多的时候,pl/sql运行比较慢,可以通过oracle的sqlplus进行导入; sqlplus user/password@tnsname@sqlfile.sql; 注意如果文件里面最后没有commit;运行完之后要进行commit; 阅读全文
posted @ 2016-07-14 10:57 忆如梨花 阅读(1152) 评论(0) 推荐(0)
摘要:insert or replace into data (ID, Name) values (2,"a") ID为主键 阅读全文
posted @ 2016-07-12 20:17 忆如梨花 阅读(334) 评论(0) 推荐(0)
摘要:insert into {14}.SEGMENT(CODE_STARTPOINTID,CODE_STARTFIR,CODE_TYPE_START,CODE_ENDPOINTID,CODE_ENDFIR,CODE_TYPE_ENDPOINT,CODE_TYPE ,VAL_... 阅读全文
posted @ 2015-07-03 16:17 忆如梨花 阅读(433) 评论(0) 推荐(0)
摘要:exp jxfoc/JXFOC@ORCL file=d:\dd.dmp tables=(jxfoc.FLIGHT_PLAN_MAKE_LOG,jxfoc.METAR_CONTENT_FOR_MAIL) query=\"where flight_no='HO1380' and flight_date=... 阅读全文
posted @ 2015-04-13 14:10 忆如梨花 阅读(454) 评论(0) 推荐(0)
摘要:declare cursor cur_test is select t.txt_desig, m.segment_id, s.code_type_direct, case when s.uom_dist_ve... 阅读全文
posted @ 2014-12-23 18:43 忆如梨花 阅读(398) 评论(0) 推荐(0)
摘要:在cmd中启动数据库实例:sqlplus /nolog 回车, conn as sysdba;回车,startup;然后回车 阅读全文
posted @ 2013-08-22 15:15 忆如梨花 阅读(657) 评论(0) 推荐(0)
摘要:在SQL里面执行vacuum即可! 阅读全文
posted @ 2013-07-12 13:07 忆如梨花 阅读(690) 评论(0) 推荐(0)
摘要:select e.txt_desig, e.routelevel, d.c, d.en_route_rte_id, t.code_startpointid, t.code_startfir, t.code_type_start, t.code_endpointid, t.code_endfir, t.code_type_endpoint, d.code_dir from en_route_rte e,segment t, (select g.en_route_rte_id, m.c, code_dir,g.segment_id from rte_seg g, (select EN_ROUTE. 阅读全文
posted @ 2013-03-21 14:47 忆如梨花 阅读(206) 评论(0) 推荐(0)
摘要:select (case when (m.code_dir = 'F') then n.code_startpointid else n.code_endpointid end) as startid, (case when (m.code_dir = 'F') then n.code_endpointid else n.code_startpointid end) as endid from rte_seg m, segment n where m.segment_id = n.segment_id 阅读全文
posted @ 2013-03-21 09:43 忆如梨花 阅读(158) 评论(0) 推荐(0)
摘要:select EN_ROUTE_RTE_ID,max(code_sort) from rte_seg group by EN_ROUTE_RTE_ID order by EN_ROUTE_RTE_ID 阅读全文
posted @ 2013-03-21 09:42 忆如梨花 阅读(754) 评论(0) 推荐(0)
摘要:select en_route_rte_id as id,txt_loc_desig||routelevel as name from en_route_rte e order by e.txt_loc_desig 阅读全文
posted @ 2013-02-21 09:38 忆如梨花 阅读(1190) 评论(0) 推荐(0)