Professional Documents
Culture Documents
===================================================================================
===============
C:\Users\user>CD..
C:\Users>CD..
C:\>CD xampp/mysql/bin
C:\xampp\mysql\bin>mysql -u root -p
Enter password:
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
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [kepegawaian]> CREATE TABLE golongan (Gol VARCHAR (3), Gaji INT);
Query OK, 0 rows affected (0.55 sec)
MariaDB [kepegawaian]> CREATE VIEW data AS SELECT NIP, Nama, YEAR (CURDATE())-YE
AR(Tgl_Lahir) AS Umur, Jenis_Kelamin, Alamat,golongan.Gol, Gaji FROM pegawai JOI
N golongan ON pegawai.Gol=golongan.Gol;
Query OK, 0 rows affected (0.10 sec)