zoukankan      html  css  js  c++  java
  • SQL高级查询

    高级查询:

    一、多表链接

    1,普通查询

    select * from 表名,表名 where 表名.列名 = 表名.列名

    2,join链接

    select * from 表名 join 表名 on 表名.列名 = 表名.列名

    二、多表联合

    select * from 表名 where 列名='内容' union select * from 表名 where 列名='内容'

    三、子查询(无关子查询)

    select * from 表名 where 列名 = (select 列名 from 表名 where 列名='内容') 查单条数据用= !=非此条数据之外的内容

    select * from 表名 where 列名 not in (select 列名 from 表名 where 列名='内容' 列名 = '内容') 查多条数据用in not就是非此类条件

    四、子查询(相关子查询)

    select * from 表名 定义名 where 定义名.列名<(select avg(列名)from 表名 定义名 where 定义名.列名 = 定义名.列名)

  • 相关阅读:
    控件显示和隐藏
    删除标题和边框
    界面图片
    VC界面最前端显示
    在VC++6.0开发中实现全屏显示
    VC比例放大缩小
    plsql dev
    通过OCCI连接oracle(C++)
    VC++使用Pro*CC++
    文件对话框
  • 原文地址:https://www.cnblogs.com/liaoliao/p/5136765.html
Copyright © 2011-2022 走看看