create database pegawai;
use pegawai;
create table gaji_peg (nip varchar(7) primary key, gaji int);
insert into gaji_peg values ('12345',2000000);
insert into gaji_peg values ('12346',1500000);
insert into gaji_peg values ('12347',1500000),('12348',3000000),('12349',4500000),('12350',2000000);
select*from gaji_peg;
*Menaikan gaji sebesar 1,2
update gaji_peg
set gaji=1.2*gaji;
*Menghapus baris
delete from gaji_peg
where nip='12345';
*Menghapus lebih dari satu baris
delete from gaji_peg
where gaji<3600000;
*Menghapus seluruh baris
delete from gaji_peg;
use pegawai;
create table gaji_peg (nip varchar(7) primary key, gaji int);
insert into gaji_peg values ('12345',2000000);
insert into gaji_peg values ('12346',1500000);
insert into gaji_peg values ('12347',1500000),('12348',3000000),('12349',4500000),('12350',2000000);
select*from gaji_peg;
*Menaikan gaji sebesar 1,2
update gaji_peg
set gaji=1.2*gaji;
*Menghapus baris
delete from gaji_peg
where nip='12345';
*Menghapus lebih dari satu baris
delete from gaji_peg
where gaji<3600000;
*Menghapus seluruh baris
delete from gaji_peg;
No comments:
Post a Comment
Your comments are very valuable