Professional Documents
Culture Documents
15063]
C:\Users\acer>cd
C:\Users\acer
C:\Users\acer>cd xampp/mysql/bin
C:\Users\acer>cd/
C:\>cd xampp/mysql/bin
C:\xampp\mysql\bin>mysql -u root
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
+--------------------+
| Database |
+--------------------+
| akademik |
| akademik_db |
| dbpendaftaran |
| information_schema |
| latihan_mahasiswa |
| mahasiswa |
| mysql |
| pegawai_uin_rf |
| performance_schema |
| phpmyadmin |
| pt_makmur_sentosa |
| rs_umum |
| saintekuinrf |
| test |
+--------------------+
Database changed
+--------------------------+
| Tables_in_pt_jaya_makmur |
+--------------------------+
| karyawan |
+--------------------------+
+---------------+--------------+------+-----+---------+-------+
+---------------+--------------+------+-----+---------+-------+
+---------------+--------------+------+-----+---------+-------+
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 'engine==innodb' at line 1
MariaDB [pt_jaya_makmur]> create table gaji(gaji_id varchar(10)not null,karyawan_id varchar(10)not
null,gaji_pokok double not null,foreign key(karyawan_id) references
karyawan(karyawan_id))ENGINE=INNODB;
+-------------+-------------+------+-----+---------+-------+
+-------------+-------------+------+-----+---------+-------+
+-------------+-------------+------+-----+---------+-------+
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 'varchar(10)not null primary key' at line 1
MariaDB [pt_jaya_makmur]> alter table gaji modify gaji_id varchar(10)not null primary key;
+-------------+-------------+------+-----+---------+-------+
+-------------+-------------+------+-----+---------+-------+
+-------------+-------------+------+-----+---------+-------+
'>
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
''),('GJ002','003','2500000'),('GJ003','002','2200000'),('GJ004','004','1900000')' at line 1
+-------------+---------------+---------+-------------+------------+
+-------------+---------------+---------+-------------+------------+
MariaDB [pt_jaya_makmur]>
+--------------------------+
| Tables_in_pt_jaya_makmur |
+--------------------------+
| gaji |
| karyawan |
+--------------------------+
+-------------+---------------+
| karyawan_id | karyawan_nama |
+-------------+---------------+
| 001 | santi |
| 002 | dewi |
| 003 | joko |
| 004 | putri |
| 005 | nadya |
| 006 | febri |
+-------------+---------------+
+---------+-------------+------------+
+---------+-------------+------------+
+---------+-------------+------------+
+-------------+---------------+---------+-------------+------------+
+-------------+---------------+---------+-------------+------------+
| 001 | santi | GJ001 | 001 | 2000000 |
+-------------+---------------+---------+-------------+------------+
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 'where gaji.karyawan_id is null' at line 1
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 'where gaji.karyawan_id IS NULL' at line 1
+-------------+---------------+---------+-------------+------------+
+-------------+---------------+---------+-------------+------------+
+-------------+---------------+---------+-------------+------------+
+---------+-------------+------------+-------------+---------------+
+---------+-------------+------------+-------------+---------------+
+---------+-------------+------------+-------------+---------------+
+---------+-------------+------------+-------------+---------------+
+---------+-------------+------------+-------------+---------------+
+---------+-------------+------------+-------------+---------------+
MariaDB [pt_jaya_makmur]>