Selasa, 30 Juni 2020

MEMBUAT DATABASE DENGAN MENGGUNAKAN XAMPP

Microsoft Windows [Version 10.0.18362.295]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\4DR1>cd..

C:\Users>cd..

C:\>cd xampp

C:\xampp>cd mysql

C:\xampp\mysql>cd bin

C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.31-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 POLTEKA ;
Query OK, 1 row affected (0.01 sec)

MariaDB [(none)]> USE POLTEKA ;
Database changed
MariaDB [POLTEKA]> CREATE TABLE POLTEKAD (
    -> nrp varchar(50),
    -> nama_bamasis varchar (50),
    -> jenis_kelamin enum ("L",:P:),
    -> satuan varchar (50),
    -> primary key (nrp)

MariaDB [POLTEKA]> CREATE TABLE POLTEKAD (
    -> nrp varchar (50),
    -> nama_bamasis varchar (50),
    -> jenis_kelamin enum ("L","P"),
    -> satuan varchar (50),
    -> primary key (nrp)
    -> );
Query OK, 0 rows affected (1.38 sec)

MariaDB [POLTEKA]> INSERT INTO POLTEKAD
    -> VALUES ("0123","ADRI","L","ARMED");
Query OK, 1 row affected (0.13 sec)

MariaDB [POLTEKA]> SELECT*FROM POLTEKAD;
+------+--------------+---------------+--------+
| nrp  | nama_bamasis | jenis_kelamin | satuan |
+------+--------------+---------------+--------+
| 0123 | ADRI         | L             | ARMED  |
+------+--------------+---------------+--------+
1 row in set (0.00 sec)

MariaDB [POLTEKA]>


Tidak ada komentar:

Posting Komentar

MEMBUAT DATABASE DENGAN MENGGUNAKAN XAMPP

Microsoft Windows [Version 10.0.18362.295] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\4DR1>cd.. C:\Users>cd.. ...