tanmyid

202053083

Jun 30th, 2022 (edited)
290
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE DATABASE db_202053083
  2.  
  3. USE db_202053083
  4.  
  5. CREATE TABLE [dbo].[barang](
  6.     [id] [INT] IDENTITY PRIMARY KEY NOT NULL,
  7.     [nama] [VARCHAR](MAX) NULL,
  8.     [jenis] [VARCHAR](MAX) NULL,
  9.     [nama_supplier] [VARCHAR](MAX) NULL,
  10.     [modal] [INT] NULL,
  11.     [harga] [INT] NULL,
  12.     [jumlah] [INT] NULL,
  13.     [sisa] [INT] NULL
  14. )
  15.  
  16. CREATE TABLE [dbo].[penjualan](
  17.     [id] [INT] IDENTITY PRIMARY KEY NOT NULL,
  18.     [tanggal] [DATE] NULL,
  19.     [nama] [VARCHAR](MAX)  NULL,
  20.     [jumlah] [INT] NULL,
  21.     [harga] [INT]  NULL,
  22.     [total_harga] [INT] NULL,
  23.     [laba] [INT] NULL
  24. )
  25.  
  26. CREATE TABLE [dbo].[supplier](
  27.     [id] [INT] NOT NULL IDENTITY PRIMARY KEY,
  28.     [nama_supplier] [VARCHAR](MAX) NULL,
  29.     [alamat] [VARCHAR](MAX) NULL,
  30.     [telepon] [VARCHAR](15) NULL
  31. )
  32.  
  33. CREATE TABLE [dbo].[USER](
  34.     [email] [VARCHAR](50) NULL,
  35.     [password] [VARCHAR](20) NULL,
  36.     [nama] [VARCHAR](50) NULL,
  37.     [STATUS] [VARCHAR](10) NULL
  38. )
  39. -- contoh perintah input
  40. INSERT INTO barang VALUES
  41.     ('Flashdisk Sandisk 32GB Cruzer Blade', 'Media Penyimpanan', 'PT. Datascript', '72000', '90000', '89', '100'),
  42.     ('Flashdisk Sandisk 16GB Cruzer Blade', 'Media Penyimpanan', 'PT. Datascript', '50000', '70000', '134', '150'),
  43.     ('Flashdisk Kioxia 16GB', 'Media Penyimpanan', 'PT. Astrindo', '49000', '70000', '45', '90'),
  44.     ('Flashdisk Kioxia 64GB', 'Media Penyimpanan', 'PT. Astrindo', '96000', '140000', '38', '40'),
  45.     ('SSD Seaget Barracuda 512GB', 'Media Penyimpanan', 'PT. Seaget Memory', '1280000', '1450000', '22', '30');
  46.  
RAW Paste Data Copied