Wednesday, March 6, 2019

Web 2-4


Perintah SQL Dasar
Membuat database di MySQL:
CREATE DATABASE bioskop;

Melihat database:
SHOW DATABASES;

Membuat Tabel
CREATE TABLE mhs(
    id VARCHAR (2) NOT NULL,
    nama VARCHAR (30) NOT NULL,
    PRIMARY KEY (id)
);


Menghapus Tabel
DROP TABLE mhs;

Menambahkan Data
Satu: INSERT INTO mhs VALUES ('01', 'Dadang')
Dua:
INSERT INTO mhs VALUES ('04', 'Nana'),
('05','Nene')

Menampilkan Data Tabel
select * from mhs;

Menghapus Satu record
DELETE from mhs WHERE nama = 'Dadang';

Mengedit satu record
UPDATE mhs SET nama ='Dewi'
WHERE id='04';


Referensi:
codepolitan.com
duniailkom.com



Bitcoin Offers:
Free Bitcoin, Double Bitcoin, Bitcoin Investment, Bitcoin Trading



"Bitcoin and Forex are high risk business. We must join them smartly."

No comments:

Post a Comment