1 / 6

JOINED TABLE

JOINED TABLE. Untuk menampilkan data dari dua atau lebih tabel, maka tabel – tabel tersebut harus dihubungkan terlebih dahulu  JOIN. Bentuk umum JOIN. SELECT table1.column, table2.column FROM tabel1, tabel2 WHERE tabel1.column=table2.column; Atau SELECT table1.column, table2.column

trish
Télécharger la présentation

JOINED TABLE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JOINED TABLE Untuk menampilkan data dari dua atau lebih tabel, maka tabel – tabel tersebut harus dihubungkan terlebih dahulu  JOIN

  2. Bentuk umum JOIN SELECT table1.column, table2.column FROM tabel1, tabel2 WHERE tabel1.column=table2.column; Atau SELECT table1.column, table2.column FROM tabel1 [type join] tabel2 On tabel1.column=table2.column;

  3. KATAGORI JOIN • INNER JOIN • OUTER JOIN - Left Join - Right Join - Full Join • CROSS JOIN

  4. INNER JOIN • Inner join berfungsi sebagai pemetaan relasi one-to-one (satu ke satu), yaitu dimana hanya satu record tabel A yang sama dengan satu record tabel B atau sebaliknya. • Menampilkan data dari dua tabel atau lebih yang ditampilkan hanya yang berkesuaian.

  5. OUTER JOIN • Left Join Menampilkan data seluruh baris ditabel “kiri”, meskipun tidak ada kecocokan di tabel sebelah kanan. • Right Join Menampilkan data seluruh baris ditabel “kanan”, meskipun tidak ada kecocokan di tabel sebelah kiri. • Full Join Menampilkan data seluruh baris ditabel kanan dan kiri walaupun salah satu table bernilai null

  6. CROSS JOIN • Menampilkan data seluruh baris di tabel kanan dan kiri walaupun tidak ada kecocokan. • Menghasilkan data hasil dari cartesian product. Hasilnya adalah jumlah data di tabel kiri akan dikalikan dengan jumlah data di tabel kanan.

More Related