Database
  • Introduction
  • Chapter1: MySQL
    • 1.1. MySQL在Max OSX上的筆記
      • 1.1.1.安裝My SQL (Mac OS X)
      • 1.1.2.My SQL在Mac上的一些warning message
        • 1.1.2.1.更改密碼
    • 1.2.MySQL for Beginners
      • 1.2.1.Getting the Development Environment Ready
        • 1.2.1.1.Windows console
      • 1.2.2.Beginning with MySQL Basics
        • 1.2.2.1.Creating a Database - CREATE DATABASE
        • 1.2.2.2.Creating a Table - CREATE TABLE
        • 1.2.2.3.Inserting Values into Table - INSERT INTO
        • 1.2.2.4.Retrieving Values from Table - SELECT
        • 1.2.2.5.Selecting Distinct Values from Column - DISTINCT
        • 1.2.2.6.Selecting a Specific Data using WHERE Clause
        • 1.2.2.7.Selecting with Multiple Identifiers Using AND
        • 1.2.2.8.Selecting with One of Many Identifiers Using OR
        • 1.2.2.9.Sorting the Data Using ORDER BY
        • 1.2.2.10.Limiting the Data Retrieved Using LIMIT
        • 1.2.2.11.Updating or Modifying Data in a Table Using UPDATE
        • 1.2.2.12.Deleting a Data from a Table Using DELETE
        • 1.2.2.13.Copy table
        • 1.2.2.14.Deleting a Table - DROP TABLE
        • 1.2.2.15.Deleting all values in Table - TRUNCATE TABLE
        • 1.2.2.16.Altering Table Structure - ALTER TABLE
      • 1.2.3.Time to Jump in for More
        • 1.2.3.1.Selecting Data with a Range - BETWEEN
        • 1.2.3.2.Creating Alias Name for a Column - AS
        • 1.2.3.3.Selecting Data which has one of Multitple Values - IN
        • 1.2.3.4.Using LIKE and WILDCARDS
        • 1.2.3.5.Copy Table with INSERT INTO SELECT
        • 1.2.3.6.Combine the Tables - UNION
      • 1.2.4.Few things that Keeps the Database in Shape
        • 1.2.4.1.Primary key
        • 1.2.4.2.Unique key
        • 1.2.4.3.Foreign key
        • 1.2.4.4.Default value
      • 1.2.5.Using Joins to Combine Tables
        • 1.2.5.1.Inner join
        • 1.2.5.2.Left join
        • 1.2.5.3.Right join
        • 1.2.5.4.Full join
  • Chapter2: MongoDB
  • Chapter3: SQL Server
    • 3.1.Obtain Query Execution Plan
    • 3.2.BCP
    • 3.3.SQL操作
      • 3.3.1.取代欄位, 更改欄位中的值
    • 3.4.產生create或drop database/table的script
Powered by GitBook
On this page

Was this helpful?

  1. Chapter1: MySQL
  2. 1.2.MySQL for Beginners
  3. 1.2.5.Using Joins to Combine Tables

1.2.5.3.Right join

Previous1.2.5.2.Left joinNext1.2.5.4.Full join

Last updated 5 years ago

Was this helpful?

  • Right join displays common data from columns specified on both table with ON keyword along with all data from first table (right table) and lists out the columns as mentioned on select

  • 以第二個table為主, 加入第一個table

select * from studentsdetails right join studentsbackup2 on studentsdetails.id = studentsbackup2.student_id;