USE `inventory`;
CREATE TABLE IF NOT EXISTS `kode_barang_psedia` (
  `KELOMPOK` char(10) NOT NULL COMMENT 'Kode Kelompok Persediaan (Tabel kelompok_psedia)',
  `BARANG` INT NOT NULL COMMENT 'ID Tabel Barang',
  `NOMOR` SMALLINT NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`KELOMPOK`,`NOMOR`),
  UNIQUE KEY `VALIDATEBARANG` (`BARANG`),
  KEY `BARANG` (`BARANG`)
) ENGINE=MyISAM;