Download LAPRAK BASDAT 2

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
LAPORAN RESMI
PRAKTIKUM BASIS DATA
“MEMANGGIL RECORD MENGGUNAKAN FUNGSI LIKE”
NAMA
NIM
DOSEN PENGAMPU
: Annisa Aghnia Nadhiroh
: 422021618014
: Al-Ustadzah Resi Utami Putri, S.Kom., M.Cs
PRODI TEKNIK INFORMATIKA
FAKULTAS SAINS DAN TEKNOLOGI
UNIVERSITAS DARUSSALAM GONTOR
2022
TUGAS
Output
1. Tampilkan record dengan kode 123 & 136 Urutkan berdasarkan alamat asc.
2. Tampilkan record dengan kode 128 & 134
3. Tampilkan record dengan nomor rumah 3, urutkan berdasarkan tipe desc
4. Tampilkan record dengan kode 132, 134, 135, 137 urutkan berdasarkan nama asc
5. Tampilkan record dengan kode 127, 128, 134 urutkan berdasarkan alamat
Tabel Database
Source Code
MariaDB [penjualan]> select* from pelanggan;
+------+----------------+----------------------+-------------+-------------+---------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+----------------+----------------------+-------------+-------------+---------+
| 123 | Pastria Sandra | JL Kledokan NO 21
| Jombang
| 08123456789 | Gold
|
| 124 | Ihsan Yusuf
| JL Kapas NO 3
| Bekasi
| 125 | Rio Dewanto
| JL Merdeka NO 14
| Jakarta
| 08123456787 | Premium |
| 126 | Sandra Dewi
| JL Pelangi NO 2
| Jakarta
| 08123456786 | Premium |
| 127 | Dewa Putra
| JL Macan NO 34
| Surabaya
| 08123456785 | Gold
|
| 128 | Kim Namjoon
| JL Hybe NO 10
| Semarang
| 08123456784 | Gold
|
| 129 | Kim Seokjin
| JL Hybe NO 3
| Tulungagung | 08123456783 | Premium |
| 130 | Min Yoongi
| JL BigHit NO 1
| Jakarta
| 08123456782 | Gold
| 131 | Jung Hoseok
| Jl BigHit NO 2
| Jakarta
| 08123456781 | Premium |
| 132 | Park Jimin
| JL Hybe NO 4
| Bekasi
| 133 | Kim Taehyung
| JL BigHit NO 10
| 134 | Jeon Jungkook | JL BigHit NO 9
| 08123456788 | Premium |
|
| 08123456780 | Silver |
| Jakarta
| 08123456799 | Premium |
| Bekasi
| 08123456798 | Silver |
| 135 | Choi Soobin
| JL Sedap Malam NO 27 | Semarang
| 08123456797 | Silver |
| 136 | Choi Yeonjun
| JL Sriwijaya NO 3
| 08123456796 | Silver |
| 137 | Choi Beomgyu
| JL Kawi NO 12
| Mataram
| 08123456795 | Gold
| 138 | Kang Taehyun
| JL Affandi NO 23
| Sragen
| 08123456794 | Premium |
| 139 | Heuning Kai
| JL Subroto NO 14
| Ngawi
| 08123456793 | Gold
| Surabaya
|
|
+------+----------------+----------------------+-------------+-------------+---------+
17 rows in set (0.068 sec)
MariaDB [penjualan]> select* from pelanggan where kode like '%123%' or kode like '%136%'order
by alamat asc;
+------+----------------+-------------------+----------+-------------+--------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+----------------+-------------------+----------+-------------+--------+
| 123 | Pastria Sandra | JL Kledokan NO 21 | Jombang | 08123456789 | Gold
| 136 | Choi Yeonjun
|
| JL Sriwijaya NO 3 | Surabaya | 08123456796 | Silver |
+------+----------------+-------------------+----------+-------------+--------+
2 rows in set (0.024 sec)
MariaDB [penjualan]> select* from pelanggan where kode like '%128%' or kode like '%134%';
+------+---------------+----------------+----------+-------------+--------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+---------------+----------------+----------+-------------+--------+
| 128 | Kim Namjoon
| JL Hybe NO 10 | Semarang | 08123456784 | Gold
| 134 | Jeon Jungkook | JL BigHit NO 9 | Bekasi
|
| 08123456798 | Silver |
+------+---------------+----------------+----------+-------------+--------+
2 rows in set (0.001 sec)
MariaDB [penjualan]> select* from pelanggan where alamat like '%3%' order by tipe desc;
+------+--------------+-------------------+-------------+-------------+---------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+--------------+-------------------+-------------+-------------+---------+
| 136 | Choi Yeonjun | JL Sriwijaya NO 3 | Surabaya
| 08123456796 | Silver |
| 124 | Ihsan Yusuf | JL Kapas NO 3
| Bekasi
| 08123456788 | Premium |
| 129 | Kim Seokjin | JL Hybe NO 3
| Tulungagung | 08123456783 | Premium |
| 138 | Kang Taehyun | JL Affandi NO 23 | Sragen
| 08123456794 | Premium |
| 127 | Dewa Putra
| 08123456785 | Gold
| JL Macan NO 34
| Surabaya
|
+------+--------------+-------------------+-------------+-------------+---------+
5 rows in set (0.001 sec)
MariaDB [penjualan]> select* from pelanggan where kode like '%132%' or kode like '%134%'
or kode like '%135%' or kode like '%137%' order by nama asc;
+------+---------------+----------------------+----------+-------------+--------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+---------------+----------------------+----------+-------------+--------+
| 137 | Choi Beomgyu | JL Kawi NO 12
| 135 | Choi Soobin
|
| JL Sedap Malam NO 27 | Semarang | 08123456797 | Silver |
| 134 | Jeon Jungkook | JL BigHit NO 9
| 132 | Park Jimin
| Mataram | 08123456795 | Gold
| JL Hybe NO 4
| Bekasi
| Bekasi
| 08123456798 | Silver |
| 08123456780 | Silver |
+------+---------------+----------------------+----------+-------------+--------+
4 rows in set (0.001 sec)
MariaDB [penjualan]> select* from pelanggan where kode like '%127%' or kode like '%128%'
or kode like '%134%' order by alamat asc;
+------+---------------+----------------+----------+-------------+--------+
| Kode | Nama
| Alamat
| Kota
| Notelp
| Tipe
|
+------+---------------+----------------+----------+-------------+--------+
| 134 | Jeon Jungkook | JL BigHit NO 9 | Bekasi
| 08123456798 | Silver |
| 128 | Kim Namjoon
| JL Hybe NO 10 | Semarang | 08123456784 | Gold
|
| 127 | Dewa Putra
| JL Macan NO 34 | Surabaya | 08123456785 | Gold
|
+------+---------------+----------------+----------+-------------+--------+
3 rows in set (0.001 sec)
Related documents