Nama: Dhita Purnama Dasrul NRP: 152019018 MK: Basis Data

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Nama : Dhita Purnama Dasrul

NRP : 152019018
MK : Basis Data

mysql: [Warning] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe: ignoring option '--no-beep'


due to invalid value ''.
Enter password: **********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.22 MySQL Community Server - GPL

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its


affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases


-> ;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| property |
| sys |
+--------------------+
5 rows in set (0.12 sec)

mysql> use property


Database changed
mysql> create table property
-> (
-> Kode_property varchar (5) not null,
-> Nama_property varchar (20) not null,
-> Tipe_property varchar (5) not null,
-> Harga_property numeric (12) not null,
-> primary key (Kode_property)
-> )
-> ;
Query OK, 0 rows affected (1.23 sec)
mysql> show tables;
+--------------------+
| Tables_in_property |
+--------------------+
| property |
+--------------------+
1 row in set (0.13 sec)

mysql> select*from property


-> ;
Empty set (0.06 sec)

mysql> insert into property


-> values('APRT1','Apartemen','58','200000000')
-> ;
Query OK, 1 row affected (0.16 sec)

mysql> show tables;


+--------------------+
| Tables_in_property |
+--------------------+
| property |
+--------------------+
1 row in set (0.14 sec)

mysql> select*from property


-> ;
+---------------+---------------+---------------+----------------+
| Kode_property | Nama_property | Tipe_property | Harga_property |
+---------------+---------------+---------------+----------------+
| APRT1 | Apartemen | 58 | 200000000 |
+---------------+---------------+---------------+----------------+
1 row in set (0.02 sec)

mysql> create table customer


-> ;
ERROR 1113 (42000): A table must have at least 1 column
mysql> create table customer
-> ;
ERROR 1113 (42000): A table must have at least 1 column

You might also like