Welcome, Guest! Sign Up RSS

TUTORIAL

Thursday, 2017-08-17
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
Category: MySQL | Views: 407 | Added by: joao_franco | Tags: mysql, View, Tutorial | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *: