Praktikum SBD (DML)


buat table mahasiswa
CREATE TABLE MAHASISWA ( NPM VARCHAR(8) PRIMARY KEY, NAMA VARCHAR(20), KELAS VARCHAR(5), DOSEN VARCHAR(20), MATKUL VARCHAR(20) );

INSERT INTO MAHASISWA VALUES (‘001′,’AMIR’,’3IA09′,’SUGENG’,’SBD’)
INSERT INTO MAHASISWA VALUES (‘002′,’AGUNG’,’3IA09′,’MARWAH’,’MATLAN’)
INSERT INTO MAHASISWA VALUES (‘003′,’BUDI’,’3IA09′,’SONY’,’MATIF’)
INSERT INTO MAHASISWA VALUES (‘004′,’BEDU’,’3IA09′,’PANIJO’,’PKN’)
INSERT INTO MAHASISWA VALUES (‘005′,’CANDIL’,’3IA09′,’ANGGA’,’AGAMA’)

tambah 5 data baru
INSERT INTO MAHASISWA VALUES (‘006′,’angga’,’3IA09′,’wauwau’,’AP1′)
INSERT INTO MAHASISWA VALUES (‘007′,’datuk’,’3IA09′,’uwauwa’,’AP2′)
INSERT INTO MAHASISWA VALUES (‘008′,’haha’,’3IA09′,’iwiwi’,’GRAFKOM’)
INSERT INTO MAHASISWA VALUES (‘009′,’selamet’,’3IA09′,’ngkoh’,’ISD’)
INSERT INTO MAHASISWA VALUES (‘010′,’uh-ah’,’3IA09′,’auuuh’,’AP4′)

menghapus data nomor 3
DELETE FROM MAHASISWA WHERE NPM = 003

ubah matlan menjadi jarkom
UPDATE MAHASISWA
SET MATKUL = ‘JARKOM’
WHERE MATKUL LIKE ‘MATLAN’

One Response

  1. smph ni blog plg cihuy. pertamax ahe ahe.

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

%d bloggers like this: