JOIN MySQL – JOIN Tabel MySQL

Sinau Join Join Tabel

Belajar Komputer

Join MySQL

Join MySQL. Untuk mengetahui perbedaan penggunaan beberapa syntax join mysql terlebih dahulu disiapkan 2 tabel. Berikut ini adalah persiapan / pembuatan tabel MHS (Mahasiswa) dan UKM (Unit Kegiatan Mahasiswa) beserta contoh pengisiannya untuk join mysql.

CREATE TABLE MHS
( NIM VARCHAR(10) PRIMARY KEY,
NAMA_MHS VARCHAR (50),
KD_UKM VARCHAR (5)
);

INSERT INTO MHS VALUES(“11.51.0008”, “Nanang Suprianto”, “ANDRO”);
INSERT INTO MHS VALUES(“11.51.0028”, “Teguh Zakaria”, “DGRAP”);
INSERT INTO MHS VALUES(“11.51.0038”, “Dwi Subroto”, “KOLAM”);
INSERT INTO MHS VALUES(“05.51.0001”, “Leonel Messi”, “”);

CREATE TABLE UKM
( KD_UKM VARCHAR(5) PRIMARY KEY,
NAMA_UKM VARCHAR (100)
);

INSERT INTO UKM VALUES(“DGRAP”, “Desain Grafis”);
INSERT INTO UKM VALUES(“FTSAL”, “Futsal”);
INSERT INTO UKM VALUES(“ANDRO”, “Android”);
INSERT INTO UKM VALUES(“KOLAM”, “Komunitas Linux”);

Hasil tabel MHS :
join mysql create table

Hasil tabel UKM :
join mysql create table select

JOIN MYSQL

JOIN MySQL tanpa penggunaan kondisi

SELECT * FROM MHS JOIN UKM;

join mysql

Query join mysql diatas menghasilkan penggabungan tabel MHS dengan tabel UKM dimana semua record…

View original post 516 more words

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s