<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    心的方向

    新的征途......
    posts - 75,comments - 19,trackbacks - 0
    inner join&left outer join&right outer join
    left outer join === left join
    rirht outer join === right join
    full outer join === full join
    inner join? === A = B
    ?
    no full inner join
    no left inner join
    no right inner join
    ?
    they are the same as the "inner join"
    ?
    ?
    ?
    ?
    Join types

    By default, a join is assumed to be an inner join. You can also request other types of joins by clicking Join Type on the Joins page of SQL Assist. The following types of joins are available:

    • Inner join
    • Left outer join
    • Right outer join
    • Full outer join

    7 An inner join is join method in which 7 a column that is not common to all of the tables being joined is dropped from 7 the resultant table. If your database supports the OUTER JOIN keywords, you 7 can extend the inner join to add rows from one table that have no matching 7 rows in the other table.

    For example, you want to join two tables to get the last name of the manager for each department. The first table is a Department table that lists the employee number of each department manager. The second table is an Employee table that lists the employee number and last name of each employee. However, some departments do not have a manager; in these cases, the employee number of the department manager is null. To include all departments regardless of whether they have a manager, and the last name of the manager, if one exists, you create a left outer join. The left outer join includes rows in the first table that match the second table or are null. The resulting SQL statement is as follows:

    SELECT DEPTNO, DEPTNAME, EMPNO, LASTNAME
       FROM DEPARTMENT LEFT OUTER JOIN EMPLOYEE
          ON MGRNO = EMPNO 

    A right outer join is the same as a left outer join, except that it includes rows in the second table that match the first table or are null. A full outer join includes matching rows and null rows from both tables.

    For example, you have two tables, Table 1 and Table 2, with the following data:

    Table 1. Table 1
    Column A Column B
    1 A
    2 B
    3 C
    Table 2. Table 2
    Column C Column D
    2 X
    4 2

    You specify a join condition of Column A = Column C. The result tables for the different types of joins are as follows:

    Inner join
    Table 3. Inner join result table
    Column A Column B Column C Column D
    2 B 2 X
    Left outer join
    Table 4. Left outer join result table
    Column A Column B Column C Column D
    1 A null null
    2 B 2 X
    3 C null null
    Right outer join
    Table 5. Right outer join result table
    Column A Column B Column C Column D
    2 B 2 X
    null null 4 2
    Full outer join
    Table 6. Full outer join result table
    Column A Column B Column C Column D
    1 A null null
    2 B 2 X
    3 C null null
    null null 4 2

    If you specify value (a,c), you obtain the following result:

    Table 7. Result of value (a,c)
    Value (a,c)
    1
    2
    3
    4
    Related concepts

    文章來源:http://21958978.spaces.live.com/Blog/cns!A7DF246804AD47BB!197.entry
    posted on 2007-03-31 10:49 阿偉 閱讀(1141) 評論(0)  編輯  收藏 所屬分類: DateBase
    主站蜘蛛池模板: 国外成人免费高清激情视频 | 亚洲国产精品综合久久一线 | 亚洲熟女一区二区三区| 国产成人亚洲精品电影| 四虎影在线永久免费观看| 美女被吸屁股免费网站| 亚洲人成电影在线播放| 成人自慰女黄网站免费大全| 亚洲色一色噜一噜噜噜| 国内精品99亚洲免费高清| 亚洲AV日韩AV鸥美在线观看| 19禁啪啪无遮挡免费网站| 亚洲国产av高清无码| 宅男666在线永久免费观看| 色费女人18女人毛片免费视频| 亚洲精品和日本精品| 永久免费av无码网站yy| 亚洲人成在线播放网站岛国| 全免费毛片在线播放| 亚洲精品国产suv一区88| 亚洲AV日韩精品一区二区三区| 一出一进一爽一粗一大视频免费的| 亚洲爆乳无码专区| 亚洲免费视频播放| 色偷偷尼玛图亚洲综合| 亚洲国产婷婷综合在线精品 | 国产精品视_精品国产免费| 夜夜爽妓女8888视频免费观看| 亚洲乱码日产一区三区| 999久久久免费精品国产| 黄色网址免费在线| 亚洲AV日韩AV永久无码下载| 大陆一级毛片免费视频观看| 国产精品极品美女自在线观看免费| 久久精品国产亚洲av水果派| 日韩a在线观看免费观看| 99久久婷婷免费国产综合精品| 91午夜精品亚洲一区二区三区| 俄罗斯极品美女毛片免费播放| 久久免费观看国产精品| 亚洲GV天堂GV无码男同|