zoukankan      html  css  js  c++  java
  • 第三件:mysql复杂语句

    连接查询

      -- inner join

      -- left join

      -- right join

      -- full join

    子查询

      -- where子句后

        标量子查询:返回结果 一列一行

          select * from student where c_id = (select id from class where c_name = '六年级一班');

        列子查询:返回结果 一列多行

          select * from student where c_id in (select id from class);

          select * from student where c_id =any (select id from class);

          select * from student where c_id =some (select id from class);

          select * from student where c_id =all (select id from class);  -- 无结果

        行子查询:返回结果 多列多行

          构造行元素(age,height)

          select * from student where (age,height) = (select max(age),max(height) from student);

      -- from子句后

        表子查询:返回结果当做二维表来使用

          select * from (select * from student order by height desc) as a group by c_id;

      -- exists子查询

        select * from student exists(select * from class where id = 3);

      

    生活就要逢山开路遇水搭桥,愿共勉!
  • 相关阅读:
    边缘检测
    图片融合
    毛玻璃
    图像添加马赛克
    图像颜色反转
    图像灰度处理
    图像仿射变换/旋转
    图像剪切/位移
    图像缩放/插值
    神经网络逼近股票价格
  • 原文地址:https://www.cnblogs.com/TianMu/p/7595798.html
Copyright © 2011-2022 走看看