Membuat Database Menggunakan CMD
Membuat Database Menggunakan CMD
C:\Users>cd..
C:\>cd 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 9
Server version: 10.4.18-MariaDB mariadb.org binary distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat, jurusan)
values
-> 1
-> 1,
->
->
->
->
->
->
->
->
->
->
->
->
->
->
->
-> 1,
-> 1511999,
-> muhammad al fatih,
-> L,
-> Jl.P.Puger 2 No 19,
-> informatika;
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 '1
1,
1,
1511999,
muhammad al fatih,
L,
Jl.P.Puger 2 No 19,
in...' at line 2
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat,
jurusan)values;
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 [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat, jurusan)
values (1, 15119999, muhammad al fatih, L, Jl.P.Puger 2 No 19, informatika), (2,
16119212, Fatimah, P, Jl.Ringin Raya, Sistem Informasi);
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 'al
fatih, L, Jl.P.Puger 2 No 19, informatika), (2, 16119212, Fatimah, P, Jl.R...' at
line 1
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat, jurusan)
values (1, 15119999, muhammad al fatih, L, Jl.P.Puger 2 No 19, informatika), (2,
16119212, Fatimah, P, Jl.Ringin Raya, Sistem Informasi);
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 'al
fatih, L, Jl.P.Puger 2 No 19, informatika), (2, 16119212, Fatimah, P, Jl.R...' at
line 1
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat,
jurusan)values
-> 1,
-> 15119999,
-> muhammad al fatih,
-> L,
-> Jl.p.Puger 2 No 19,
-> Informatika;
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 '1,
15119999,
muhammad al fatih,
L,
Jl.p.Puger 2 No 19,
Informatika' at line 2
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat,
jurusan)values
-> (1, 15119999, muhammad al fatih, L, Jl.P.Puger 2 No 19, Informatika),
(2,16119212,fatimah,P,Jl.Ringin Raya,Sistem Informasi);
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 'al
fatih, L, Jl.P.Puger 2 No 19, Informatika),(2,16119212,fatimah,P,Jl.Ringin...' at
line 2
MariaDB [db_kampus]> insert into tbl_mahasiswa (id, nim, nama, jk, alamat,
jurusan)values
-> ('1','15119999','muhammad al fatih','L','Jl.P.Puger 2 No 19','informatika'),
('2','16119212','fatimah','P','Jl.Ringin Raya','Sistem Infromasi');
Query OK, 2 rows affected (0.021 sec)
Records: 2 Duplicates: 0 Warnings: 0
MariaDB [db_kampus]>