create Database Universitas
use universitas
create table Prodix(
Kodeprodi char(3)not null primary key,
Namaprox varchar(30))
select*from Prodix
Insert into Prodix Values('P01','Manajemen Informatika')
Insert into Prodix Values('P02','Komputerisasi Akuntansi')
Create table Kelasx(
Kodekelas char(3)not null primary key,
Namakls varchar(12))
select*from Kelasx
Insert into Kelasx Values('K01','KA 12-01')
Insert into Kelasx Values('K02','MI 12-09')
Insert into Kelasx Values('K03','MI 12-08')
create table Mahasiswa(
NIM char(13)not null primary key,
Nama varchar(10),
Alamat varchar(20),
Jenkel char(1),
Agama varchar(10),
KodeProx char(3),
KodeKlx char(3),
Matkulx varchar(10))
select*from Mahasiswa
Insert into Mahasiswa Values('201201030181','Ririn','Jl.Melanthon','P','Kristen','P01','K02')
Insert into Mahasiswa Values('201201030182','Riski','Jl.Kisaran','L','Islam','P02','K01')
Insert into Mahasiswa Values('201201030183','Ricardo','Jl.Melati','L','Katolik','P01','K03')
Insert into Mahasiswa Values('201201030184','Romega','Jl.Tomuan','P','Buddha','P02','K01')
Insert into Mahasiswa Values('201201030185','Robi','Jl.Asahan','L','Hindu','P01','K02')
delete Mahasiswa
Update Mahasiswa set Agama='Krismatik' where Agama ='Hindu'
Update Mahasiswa set Agama='Kristen'
Tidak ada komentar :
Posting Komentar