zoukankan      html  css  js  c++  java
  • 10.1 定位连续值的范围

    drop view v;
    create table v (
    proj_id int(2),
    proj_start date,
    proj_end date);

    insert into v values(1,'2005-03-01','2005-03-02');
    insert into v values(2,'2005-03-02','2005-03-03');
    insert into v values(3,'2005-03-03','2005-03-04');
    insert into v values(4,'2005-03-04','2005-03-05');
    insert into v values(5,'2005-03-05','2005-03-07');
    insert into v values(6,'2005-03-06','2005-03-17');
    insert into v values(7,'2005-03-17','2005-03-18');
    insert into v values(8,'2005-03-18','2005-03-19');
    insert into v values(9,'2005-03-19','2005-03-20');
    insert into v values(10,'2005-03-21','2005-03-22');
    insert into v values(11,'2005-03-26','2005-03-27');
    insert into v values(12,'2005-03-27','2005-03-28');
    insert into v values(13,'2005-03-28','2005-03-29');
    insert into v values(14,'2005-03-29','2005-03-30');

    select v1.proj_id,v1.proj_start,v1.proj_end from v v1,v v2 where v1.proj_end=v2.proj_start;

  • 相关阅读:
    期末总结
    虚拟存储器学习记录
    实验报告
    并发编程学习记录
    进程&信号&管道实践学习记录
    异常控制流学习记录
    系统级IO实践学习记录
    系统级I/O学习记录
    Arduino小车学习与研究
    期中总结
  • 原文地址:https://www.cnblogs.com/liang545621/p/7523319.html
Copyright © 2011-2022 走看看