Jumat, 03 Juli 2020

MEMBUAT DATA BASE DENGAN MENGGUNAKAN EXAMPP


Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\HP>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 MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.16 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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> CREATE DATABASE POLTEKAD;
Query OK, 1 row affected (0.00 sec)
mysql> USE POLTEKAD;
Database changed
mysql> 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 (0.02 sec)
mysql> INSERT INTO POLTEKAD
    -> VALUES ("2117","RAENSI","L","POLTEKAD");
Query OK, 1 row affected (0.01 sec)
mysql> SELECT*FROM POLTEKAD;
+------+--------------+---------------+----------+
| NRP  | NAMA_BAMASIS | JENIS_KELAMIN | SATUAN   |
+------+--------------+---------------+----------+
| 2117 | RAENSI       | L             | POLTEKAD |
+------+--------------+---------------+----------+
1 row in set (0.00 sec)
mysql>






Tidak ada komentar:

Posting Komentar