zoukankan      html  css  js  c++  java
  • 送货地图中的数据库操作

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

    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

  • 相关阅读:
    CodeSmith入门教程
    AJAX调用实例
    药品监控增加表结构
    典型SQL 语句总结
    CRM中常用代码
    win2000sever+IIS5不能下载exe文件处理方法
    常用的文件对应的MIME类型
    数据库范式1NF 2NF 3NF BCNF
    多线程编程中如何更改UI值
    NHibernate学习笔记(2)—关系映射
  • 原文地址:https://www.cnblogs.com/woainixxx/p/10860842.html
Copyright © 2011-2022 走看看