Welcome, Guest! Sign Up RSS

TUTORIAL

Saturday, 2017-10-21
Main » 2013 » November » 28 » Cara Membuat Tabel dengan MySQL
5:10 AM
Cara Membuat Tabel dengan MySQL
Contoh tabel penjualan

Code
CREATE TABLE IF NOT EXISTS `tbpenjualan` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `kd_brg` varchar(200) NOT NULL,
  `nm_pembeli` varchar(200) NOT NULL,
  `tanggal` date NOT NULL,
  `jumlah` int(10) NOT NULL,
  `harga` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;





Contoh tabel barang

Code
CREATE TABLE IF NOT EXISTS `tbbarang` (
  `nm_brg` varchar(200) DEFAULT NULL,
  `no_brg` varchar(200) NOT NULL DEFAULT '',
  `kat_brg` varchar(200) DEFAULT NULL,
  `mrk_brg` varchar(200) DEFAULT NULL,
  `des_brg` varchar(200) DEFAULT NULL,
  `jml` int(10) DEFAULT NULL,
  `harga` int(10) DEFAULT NULL,
  PRIMARY KEY (`no_brg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Attachments: Image 1 · Image 2
Category: MySQL | Views: 258 | Added by: joao_franco | Tags: mysql, Tutorial | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *: