create database Kampus
Use Kampus
create table DataMahasiswa(
NIM
char(6)not null primary key,
Nama
varchar(10),
NIDN
char(4),
Alamat
varchar(25),
Kota
varchar(11),
TmpLhr
varchar(14),
TglLhr
varchar(10),
JnsKlm
char(1))
select*from DataMahasiswa
Insert into DataMahasiswa
values('120401','Salman','MI01','Jln.Makasar
No.84','P.Siantar','P.Siantar','29/09/85','P')
Insert into DataMahasiswa
values('120402','Supri','MI02','Jln.Asahan No.15','P.Siantar','Palu','23/01/85','L')
Insert into DataMahasiswa
values('120403','Uno','MI01','Jln.Jawa
No.1','P.Siantar','Bogor','08/04/87','L')
Insert into DataMahasiswa
values('120404','Rina','MI02','Jln.Kartini
No.23','P.Siantar','Sibolga','12/12/87','P')
Insert into DataMahasiswa
values('120405','Syam','MI01','Jln.Diponegoro
No.12','P.Siantar','Jakarta','14/05/83','L')
Select*from DataMahasiswa
update DataMahasiswa set
Alamat='Jln.Medan No.45' where Alamat='Jln.Makasar No.84'
Select*from DataMahasiswa
Update DataMahasiswa set JnsKlm='P'
Select Nim as 'No.Induk Mahasiswa',JnsKlm
as'Jenis Kelamin'from DataMahasiswa
Update DataMahasiswa set JnsKlm='L'
Select Nama as'Nama',JnsKlm as'Jenis
Kelamin' from DataMahasiswa
Delete DataMahasiswa where Nama='Syam'
Delete DataMahasiswa where NIDN ='MI01'
Update DataMahasiswa set JnsKlm='P'
create table DataDosen(
NIDN
char(4)not null primary key,
NamaDosen
varchar(30),
Alamat
varchar(30),
Kota
varchar(13),
JnsKlmn
char(1))
select*from DataDosen
Insert into DataDosen
values('MI01','Sundari Retno Andani','Jln.Batalion No.1','P.Siantar','P')
Insert into DataDosen
values('MI02','Rafiqa Dewi','Jln.Jamin Ginting','P.Siantar','P')
Tidak ada komentar :
Posting Komentar