Contoh:
INSERT INTO data_pegawai
(nama_pegawai, alamat_pegawai)
values ("Manisha", “Yogyakarta");
Deleting Entries from
Tables
The SQL delete statement
requires the table name and
optional conditions.
DELETE from table_name
WHERE conditions;
Contoh:
DELETE from data_pegawai WHERE
id_pegawai = 1;
Updating Records
The SQL UPDATE command
updates the data in tables. Its
format is quite simple.
SELECT MONTH(CURRENT_DATE);
SELECT YEAR(CURRENT_DATE);
Finding
the Average
Menampilkan rata-rata gaji pegawai.
SELECT AVG(gaji) from data_pegawai;
Aggregate Functions
Minimum value
Menampilkan gaji minimum.
SELECT MIN(gaji) from data_pegawai;
Maximum value
Also,
you can sort the unique entries using
ORDER BY.
SELECT DISTINCT alamat_pegawai from
data_pegawai ORDER by alamat_pegawai;