简单的从两个表查询数据,组合起来

select o.表1, d.*
FROM 表2 d,
表1 o
where d.CODE = o.CODE
and o.COUNTY_CODE = '310118'
;

 

插入
insert into T_WEB_TOWNSHIPDELIVERY (VILLAGECODE,VILLAGENAME,PARENTDISTRICTCODE,DELIVERYADDTIME,DELIVERYSALESDEPTNAME,
DELIVERYTYPE,DELIVERYREMARK,UPDATETIME,MUCHHIGHERDELIVERY)
values('43123412','测试','33333323','0.5','W9878987897','no_delivery','法地附近都是固定',to_date('2019-05-13 19:31:00','yyyy-mm-dd hh24:mi:ss'),'100'
);

 

更新
update T_WEB_TOWNSHIPDELIVERY set
DELIVERYADDTIME ='1'
,DELIVERYSALESDEPTNAME = 'W9878987897'
,DELIVERYTYPE = 'no_delivery'
,DELIVERYREMARK ='非打死of就动手就发哦送大家发送'
,UPDATETIME =to_date('2019-05-13 19:31:00','yyyy-mm-dd hh24:mi:ss')
,MUCHHIGHERDELIVERY = '150'
,VILLAGECODE ='431235414321'
,PARENTDISTRICTCODE = '33333323'
where VILLAGECODE = '520322012'

 

数据库查询当前时间

select sysdate from dual;

加索引
Create Index VILLAGECODE_index On T_WEB_TOWNSHIPDELIVERY(VILLAGECODE)

删除索引
drop index VILLAGECODE_index

Create Index PARENTDISTRICTCODE_index On T_WEB_TOWNSHIPDELIVERY(PARENTDISTRICTCODE)

查询索引
select * from all_indexes where table_name = 'T_WEB_TOWNSHIPDELIVERY';

更多的关于创建索引https://blog.csdn.net/farxix/article/details/80162437