Database Penjualan

 Contoh Bentuk 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;

6. alter table suplier change telepon phone char(15);
7. alter table suplier rename to supliyer;
8. drop table pelanggan;
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';




Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment