MY SQL DATABASE MAHASISWA

Posted by Heni cliquers Sabtu, 23 Maret 2013 0 komentar
-. Membuat tabel;
create database Mahasiswa1;
Use Mahasiswa1;
-Membuat tabel;
create table Mahasiswa1 (NIM Varchar (10), Nama Varchar (30), alamat varchar (20), jenis_Kelamin Set ("l","P"),primary key (NIM));
-Mengisi tabel;
insert Into Mahasiswa1 (NIM,Nama,alamat,jenis_kelamin) values
("A2.0900001","ROMY","Jl.Geusan Ulun","l"),
("A2.0900002","MIA","Jl.Pangeran Kornel","P"),
("A2.0900003","ASEP","Jl.Martadinata","L"),
("A2.0900005","IWAN","Jl.Mulawarman","L"),
("A2.0900006","JOHAN","Jl.Martadinata","L"),
("A2.0900007","YATI","Jl.Gurame","P"),
("A2.0900008","SETIAWAN","Jl.Pangeran Kornel","L"),
("A2.0900009","ASEP K.","Jl.Moh.Toha","L"),
("A2.0900010","NOER","Jl.Mulawarman","P");



 -Membuat tabel;

create Table NILAI (NIM Char (10), Nilai_UAS int (3),Primary Key (NIM));
-Mengisi tabel;
insert Into NILAI (NIM,Nilai_UAS) values
("A2.090001","75"),
("A2.090002","60"),
("A2.090003","70"),
("A2.090006","85"),
("A2.090008","55"),
("A2.090010","80");
Select * From NILAI;

-Membuat tabel;
create Table Keuangan_mhs (NIM char (10), Uang_Kuliah int (10), Uang_SKS int (10), Primary key (NIM));
-Mengisi tabel
insert Into Keuangan_mhs (NIM, Uang_Kuliah,Uang_SKS) Values
("A2.0900003","1000000","700000"),
("A2.0900005","1000000","300000"),
("A2.0900007","750000","200000"),
("A2.0900010","1000000","1250000");
select * from keuangan_mhs;

----------------------------

tamplikan masiswa yang bukan laki-laki
select * from mahasiswa1 where jenis_kelamin like "P";

tampilkan alamat
select Nama from Mahasiswa1 where Nama Like "%AN";

select Nama from mahasiswa1 where alamat = "Jl.Mulawarman" or alamat = "Jl.Gurame" or alamat = "Jl.Martadinata" or alamat = "Geusan Ulun";
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: MY SQL DATABASE MAHASISWA
Ditulis oleh Heni cliquers
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://heni-cliquers.blogspot.com/2013/03/my-sql-database-mahasiswa.html. Terima kasih sudah singgah membaca artikel ini.

0 komentar:

Posting Komentar

heni cliquers's Blog support - Original design by | heni cliquers.