sudo mariadb
#lihat yang login
select user();
#membuat databases bernama dbroot;
create database dbroot;
#pilih database
use dbroot
#buat table bernama hero dan tipenya
create table hero (id int, nama varchar(255), umur float);
#cek table
desc tables;
describe hero;
#buat isi table
insert into hero values (1, "gusion", 25.7)
#ubah tipe data colom
#mengubah nama id ke nomor
alter table hero change id nomor int;
#mengubah isi kolom
update hero set nama = "lancelot" where nama = "gusion"
UPDATE nama_table SET nama_colum = 8.1 WHERE nama_table = "namanya";
#manambah colom role di table hero
alter table hero add role char(50);