Query MariaDB



Contoh query pada MariaDB

create database polinela;

show databases;
use polinela;
create table mahasiswa(npm varchar(8) not null, nama varchar(30) not null, primary key (npm));
describe mahasiswa;
show tables;

 

insert into mahasiswa (npm, nama) values ('22753020','Isfahani Zahra');
select * from mahasiswa;
delete from mahasiswa where npm='22753020';

kalau pakai date

insert into mahasiswa (npm,nama,tgl_lahir,alamat) values ('22753094','Rafi Septiadi', ("2003-9-3"), 'Pringsewu')