zoukankan      html  css  js  c++  java
  • 关于sql语句

    //增加
    insert into  a(name,score) values()
    //删除
    delete from biao where 字段
    truncate biao
    //更新数据
    update biao set 字段=新
    //查询数据
    select ziduan from biao where tiaojian
    //查询所有
    select from biao
    //使用别名
    select ziduan as '',ziduan2 from biao
    //where条件
    select*from biao where ziduan1 and ziduan2
    //between and
    select * from biao where ziduan between and
    //空条件查询
    select * from biao where ziduan IS Null
    //模糊查询
    select * from biao where ziduan like '%w%'
    //去除重复数据
    select distinct ziduan from biao
    //排序
    select * from biao order by lieming asc/desc
    //聚合查询
    select count(lieming)tiaojian  from biao;
    select  min(lieming)tiaojian  from biao;
    select max() tiaojianfrom biao;
    select  avg() tiaojianfrom biao;
    select sum() tiaojianfrom biao;
    //分组查询
    select count(lieming) boys from ziduan group by tiaojian;
    //筛选条件后使用
    select count(lieming) boys from ziduan group by tiaojian having;
  • 相关阅读:
    Poj3295 tautology
    Poj2586 每五个月都是亏
    Poj 2109 k^n = p.
    Poj2109 (2) k^n = p.
    Poj2109 (1) k^n = p.
    Poj2965 冰箱的开关
    Poj1328 用雷达覆盖所有的岛屿
    FASTER-RCNN
    卷积、池化计算
    理论感受野的计算
  • 原文地址:https://www.cnblogs.com/mmore123/p/12881328.html
Copyright © 2011-2022 走看看