Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
207]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\user>
C:\Users\user>cd C:\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 8
Server version: 10.4.10-MariaDB mariadb.org binary distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-> ;
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 1
MariaDB [kuliah]> create table mhs_matkul(
-> id_mhs_matkul int (5),
-> nim varchar(10),
-> kd_matkul varchar(10),
-> foregn key(nim) references nama(nim);
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
'key(nim) references nama(nim)' at line 5
MariaDB [kuliah]> create table mhs_matkul(
-> id_mhs_matkul int (5),
-> nim varchar(10),
-> kd_matkul varchar(10),
-> foregn key(nim) references nama(nim));
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
'key(nim) references nama(nim))' at line 5
MariaDB [kuliah]> create table mhs_matkul(
-> id_mhs_matkul int (5),
-> nim varchar(10),c
-> ;
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 3
MariaDB [kuliah]> create table mhs_matkul(
-> id_mhs_matkul int (5),
-> nim varchar(10),
-> kd_matkul varchar(10),
-> foreign key(nim) references nama(nim));
Query OK, 0 rows affected (0.028 sec)
MariaDB [kuliah]> insert into matkul values ('IPS','Pratikum Struktur Data dan
Algoritma');
ERROR 1136 (21S01): Column count doesn't match value count at row 1
MariaDB [kuliah]> insert into matkul values ('IPS','Pratikum Struktur Data dan
Algoritma',2);
Query OK, 1 row affected (0.004 sec)
MariaDB [kuliah]> update from mahasiswa set nim = '1911521020' where nim =
'1911521010';
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 'from
mahasiswa set nim = '1911521020' where nim = '1911521010'' at line 1
MariaDB [kuliah]> update * from mahasiswa set nim = '1911521020' where nim =
'1911521010';
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 '* from
mahasiswa set nim = '1911521020' where nim = '1911521010'' at line 1
MariaDB [kuliah]> update from mahasiswa set nim = '1911521020' where nim =
'1911521010';
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 'from
mahasiswa set nim = '1911521020' where nim = '1911521010'' at line 1
MariaDB [kuliah]> update from nama set nim = '1911521020' where nim =
'1911521010';
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 'from
nama set nim = '1911521020' where nim = '1911521010'' at line 1
MariaDB [kuliah]> update nama set nim = '1911521020' where nim = '1911521010';
Query OK, 1 row affected (0.004 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [kuliah]> update nama set tgl_lahir = '2020-10-02' where tgl_lahir = '2001-
07-29';
Query OK, 1 row affected (0.003 sec)
Rows matched: 1 Changed: 1 Warnings: 0
C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 179
Server version: 10.4.10-MariaDB mariadb.org binary distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.