SHARE
TWEET

CONTOH SQL KU

gundambison Jun 6th, 2020 678 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- phpMyAdmin SQL Dump
  2. -- version 5.0.2
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Jun 06, 2020 at 07:43 AM
  7. -- Server version: 5.7.24
  8. -- PHP Version: 7.2.19
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. START TRANSACTION;
  12. SET time_zone = "+00:00";
  13.  
  14. --
  15. -- Database: `wrk_demo`
  16. --
  17.  
  18. -- --------------------------------------------------------
  19.  
  20. --
  21. -- Table structure for table `detailpenjualan`
  22. --
  23.  
  24. CREATE TABLE `detailpenjualan` (
  25.   `id_urut` INT(11) NOT NULL,
  26.   `id_barang` INT(10) NOT NULL,
  27.   `jumlah_pembelian` INT(15) NOT NULL,
  28.   `harga_satuan` BIGINT(10) NOT NULL,
  29.   `tanggal_penjualan` DATE NOT NULL,
  30.   `total_harga` BIGINT(10) NOT NULL
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  32.  
  33. --
  34. -- Indexes for dumped tables
  35. --
  36.  
  37. --
  38. -- Indexes for table `detailpenjualan`
  39. --
  40. ALTER TABLE `detailpenjualan`
  41.   ADD PRIMARY KEY (`id_urut`),
  42.   ADD KEY `id_barang` (`id_barang`);
  43.  
  44. --
  45. -- Constraints for dumped tables
  46. --
  47.  
  48. --
  49. -- Constraints for table `detailpenjualan`
  50. --
  51. ALTER TABLE `detailpenjualan`
  52.   ADD CONSTRAINT `detailpenjualan_ibfk_1` FOREIGN KEY (`id_barang`) REFERENCES `masterbarang` (`id_barang`) ON DELETE CASCADE ON UPDATE CASCADE;
  53. COMMIT;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top