Praktikum 8

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Microsoft Windows [Version 10.0.18363.

1556]

(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\My HP>cd..

C:\Users>cd..

C:\>cd xampp/mysql/bin

C:\xampp\mysql\bin>mysql -u root

Welcome to the MariaDB monitor. Commands end with ; or \g.

Your MariaDB connection id is 11

Server version: 10.4.24-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> CREATE DATABASE PERPUSTAKAAN;

ERROR 1007 (HY000): Can't create database 'perpustakaan'; database exists

MariaDB [(none)]> SHOW DATABASE;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to use
near 'DATABASE' at line 1

MariaDB [(none)]> SHOW DATABASES;

+--------------------+

| Database |

+--------------------+

| information_schema |
| mysql |

| performance_schema |

| perpustakaan |

| phpmyadmin |

| test |

+--------------------+

6 rows in set (0.001 sec)

MariaDB [(none)]> USE PERPUSTAKAAN

Database changed

MariaDB [PERPUSTAKAAN]> CREATE TABLE ANGGOTA(

-> NO_ANGGOTA INT(3) NOT NULL PRIMARY KEY,

-> NAMA CHAR (10),

-> JENIS_KELAMIN CHAR (10) NOT NULL,

-> ALAMAT TEXT,

-> NO_TELEPHONE VARCHAR (15));

Query OK, 0 rows affected (0.745 sec)

MariaDB [PERPUSTAKAAN]> DESC ANGGOTA;

+---------------+-------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+---------------+-------------+------+-----+---------+-------+

| NO_ANGGOTA | int(3) | NO | PRI | NULL | |

| NAMA | char(10) | YES | | NULL | |

| JENIS_KELAMIN | char(10) | NO | | NULL | |

| ALAMAT | text | YES | | NULL | |

| NO_TELEPHONE | varchar(15) | YES | | NULL | |

+---------------+-------------+------+-----+---------+-------+
5 rows in set (0.153 sec)

MariaDB [PERPUSTAKAAN]> INSERT INTO ANGGOTA (

-> VALUES

-> (100,'AULIYA','PEREMPUAN','WASOLANGKA','081245527290'),

-> (101,'MAIMUDAH', 'PEREMPUAN'

-> (101,'MAIMUDAH','PEREMPUAN','BONE','123456789012'),

-> (102, 'ESTY','PEREMPUAN','KONUT','345678901234'),

-> (104,'SAID','GAY','WAKATOBI','356890213467');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to use
near '(101,'MAIMUDAH','PEREMPUAN','BONE','123456789012'),

(102, 'ESTY','PEREMPUAN',...' at line 5

MariaDB [PERPUSTAKAAN]> INSERT INTO ANGGOTA (

-> VALUES

-> (100,'AULIYA','PEREMPUAN','WASOLANGKA','081245527290'),

-> (101,'MAI','PEREMPUAN','JOMBANG','085242259231'),

-> (102,'ESTY','PEREMPUAN','KONAWE','085242251852');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to use
near '' at line 5

MariaDB [PERPUSTAKAAN]>

You might also like