Main » 2013 November 28 » Cara Membuat View dengan MySQL
5:21 AM Cara Membuat View dengan MySQL |
Contoh View dari tabel penjualan dan tabel barang yang telah dibuat pada tutorial sebelumnya di sini Code CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `jualdetail` AS select `p`.`kd_brg` AS `kd_brg`,`b`.`nm_brg` AS `nm_brg`,`b`.`mrk_brg` AS `mrk_brg`,`b`.`kat_brg` AS `kat_brg`,`b`.`harga` AS `harga`,`p`.`jumlah` AS `jumlah`,`p`.`harga` AS `harga total`,`p`.`nm_pembeli` AS `nm_pembeli`,`p`.`tanggal` AS `tanggal` from (`tbbarang` `b` join `tbpenjualan` `p`) where (`p`.`kd_brg` = `b`.`no_brg`) order by `p`.`tanggal`; Attachments: Image 1 |
|
Total comments: 0 | |