drop database if exists MG_TB_MJ;
create database MG_TB_MJ;

use MG_TB_MJ;

-- table Barang --
create table mg_barang(
Kd_Brg varchar(50) not null comment 'Kode Barang',
Barcode varchar(50) not null comment 'Kode Barcode',
Nm_Brg varchar(250) not null comment 'Nama Barang',
Hrg_Jual decimal(20,2) not null comment 'Harga Jual',
Hrg_Bon decimal(20,2) not null comment 'Harga Bon',
Hrg_Toko decimal(20,2) not null comment 'Harga Toko',
primary key (Kd_Brg),
unique key (Barcode)
)
engine=InnoDB default charset=utf8 comment 'Table Barang';