Advertisement
afrizalwahyuadi66

Prak. Basis Data Pertemuan 10

Dec 7th, 2024 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.64 KB | Source Code | 0 0
  1. MariaDB [(none)]> create database puskesmas;
  2. MariaDB [(none)]> use puskesmas;
  3. MariaDB [puskesmas]> insert into obat MariaDB [puskesmas]> (kode_obat,Nama_obat,Satuan_obat,Jumlah,Jenis_obat) values ('B001','Paracetamol','Kapsul','100','Keras');
  4.  
  5. Mengisi Values:
  6. MariaDB [puskesmas]> insert into obat (kode_obat,Nama_obat,Satuan_obat,Jumlah,Jenis_obat) values ('B002','Bodrek','Kapsul','25','Ringan');
  7.  
  8. Mengganti Values:
  9. MariaDB [puskesmas]> update obat set Nama_obat='Bodreksin' where Kode_obat='B002';
  10.  
  11. Menghapus Values:
  12. MariaDB [puskesmas]> delete from obat where Kode_obat='B002';
  13.  
  14. menghapus semua Values:
  15. MariaDB [puskesmas]> delete from obat;
Tags: sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement