Update SET Case
Update SET Case
null, alamat varchar(100) not null, tanggal date not null, primary key(id) ); Drop table latihan; insert into iseng (id,nama,alamat,tanggal) values ('null', 'hoho', 'asasa', '2013-08-06'); desc iseng; menampilkan table alter table customer add usia varchar(2) not null after nama; insert into iseng (id,nama,alamat,tanggal) values ('null', 'arissa', 'bogor', '2013-08-06'), ('null', 'chaud', 'kedaung', '2013-08-06'), ('null', 'budi', 'pamulang', '2013-08-06'); update iseng set nama='dwi', alamat='pamulang' where id='3'; delete from iseng where id=3; select nama, alamat from iseng; select * from iseng where alamat='pamulang'; select * from iseng where alamat='pamulang' and pendidikan=diploma; select * from iseng where alamat='pamulang' or alamat=ciputat; select * from iseng where alamat='pamulang' and (pendidikan=diploma or pendidikan=smu); select nama,jk,jenis from customer where no='3'; select*from customer order by nama asc; select*from matakuliah where sks=3 order by nama asc; UPDATE customer SET jk = CASE no WHEN 1 THEN 'L' WHEN 2 THEN 'P' WHEN 3 THEN 'L' WHEN 4 THEN 'L' END WHERE no IN ( 1, 2, 3, 4 ) Alter table iseng change nama nama varchar(100) not null