Contoh Bentuk Database (Penjualan)
1. create database penjualan;
1. create database penjualan;
2.
use penjualan;
3.
create table suplier (kodesuplier integer
primary key,namasuplier char(20) not null,alamat char(30)not null default 'Jl. gajahmada No.1',telpon char(15));
create table pelanggan (kodesuplier integer
primary key,namasuplier char(20) not null,alamat char(30)not null default 'Jl. gajahmada No.1',telpon char(15));
4. create index suplier_my on suplier(namasuplier);
5. alter table suplier add kota char(15) after
alamat;
alter table suplier drop kota;
9.
insert into supliyer
(namasuplier,kodesuplier,alamat,kota,phone)
values('bisma',301,'Jl.mawar 9','Soerabaja','089183748349');
insert into supliyer
(namasuplier,kodesuplier,alamat,kota,phone)
values('nouval',302,'Jl.kendung 945','Soerabaja','081098246589');
insert into supliyer
(namasuplier,kodesuplier,alamat,kota,phone)
values('muslichul',303,'Jl.semampir no.9','Soerabaja','082047915923');
insert into supliyer
(namasuplier,kodesuplier,alamat,kota,phone)
values('marsel',304,'Jl.blingsatan no.99','Soerabaja','088573948104');
insert into supliyer
(namasuplier,kodesuplier,alamat,kota,phone)
values('chisnu',305,'Jl.rungkut kidul no.21','Soerabaja','087039483035');
10.
update supliyer set namasuplier='Hullatul
Jannah',kodesuplier='212',alamat='Jl.Ahmad Yani 31',kota='surabaya',phone='08520241034'
where namasuplier='bisma';
11.
delete from supliyer where
namasuplier='chisnu';












0 comments:
Post a Comment