NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Microsoft Windows [Version 10.0.19041.572]
(c) 2020 Microsoft Corporation. All rights reserved.

C:xamppmysqlbin>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 8
Server version: 10.4.14-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| cs |
| information_schema |
| kei |
| mysql |
| performance_schema |
| phpmyadmin |
| surguuli |
| test |
+--------------------+
8 rows in set (0.023 sec)

MariaDB [(none)]> use surguuli;
Database changed
MariaDB [surguuli]> show tables;
+--------------------+
| Tables_in_surguuli |
+--------------------+
| department |
| students |
| students1 |
| users |
+--------------------+
4 rows in set (0.000 sec)

MariaDB [surguuli]> cls
-> cl
->
-> exit;
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 'cls
cl

exit' at line 1
MariaDB [surguuli]>
MariaDB [surguuli]> exit;
Bye

C:xamppmysqlbin>mysqldump -u root -p surguuli > cs.sql
Enter password:

C:xamppmysqlbin>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 10
Server version: 10.4.14-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> craete dt
-> ;
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 'craete dt' at line 1
MariaDB [(none)]> create database dorjnymbuu;
Query OK, 1 row affected (0.002 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| cs |
| dorjnymbuu |
| information_schema |
| kei |
| mysql |
| performance_schema |
| phpmyadmin |
| surguuli |
| test |
+--------------------+
9 rows in set (0.001 sec)

MariaDB [(none)]> exit;
Bye

C:xamppmysqlbin>mysql -u root -p dorjnymbuu<cs.sql
Enter password:

C:xamppmysqlbin>show tables;
'show' is not recognized as an internal or external command,
operable program or batch file.

C:xamppmysqlbin>show databases;
'show' is not recognized as an internal or external command,
operable program or batch file.

C:xamppmysqlbin>show databases;
'show' is not recognized as an internal or external command,
operable program or batch file.

C:xamppmysqlbin>show database;
'show' is not recognized as an internal or external command,
operable program or batch file.

C:xamppmysqlbin>mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or g.
Your MariaDB connection id is 12
Server version: 10.4.14-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| cs |
| dorjnymbuu |
| information_schema |
| kei |
| mysql |
| performance_schema |
| phpmyadmin |
| surguuli |
| test |
+--------------------+
9 rows in set (0.001 sec)

MariaDB [(none)]> use dorjnymbuu;
Database changed
MariaDB [dorjnymbuu]> show tables;
+----------------------+
| Tables_in_dorjnymbuu |
+----------------------+
| department |
| students |
| students1 |
| users |
+----------------------+
4 rows in set (0.000 sec)

MariaDB [dorjnymbuu]> mysql -u root -p
-> ;
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 'mysql -u root -p' at line 1
MariaDB [dorjnymbuu]> use movie
Database changed
MariaDB [movie]> show tables;
+-----------------+
| Tables_in_movie |
+-----------------+
| comments |
| movie |
| rating |
| reviewer |
| viewer |
+-----------------+
5 rows in set (0.000 sec)

MariaDB [movie]> select * from movie;
+---------+-------------------------+-------+------------------+
| movieID | title | year1 | director |
+---------+-------------------------+-------+------------------+
| M101 | Star Wars | 1977 | George Lucas |
| M102 | Titanic | 1997 | James Cameron |
| M103 | Snow White | 1937 | NULL |
| M104 | Avatar | 2009 | James Cameron |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg |
+---------+-------------------------+-------+------------------+
5 rows in set (0.000 sec)

MariaDB [movie]> select * from comments;
+---------+------------+------------+-------+
| movieID | reviewerID | vDate | comm |
+---------+------------+------------+-------+
| M104 | R105 | 2020-03-28 | Nice! |
| M102 | R104 | 2020-04-22 | Hello |
+---------+------------+------------+-------+
2 rows in set (0.000 sec)

MariaDB [movie]> select * from movie join comments
-> on movie.movieID = comments.movieID;
+---------+---------+-------+---------------+---------+------------+------------+-------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+---------+-------+---------------+---------+------------+------------+-------+
| M102 | Titanic | 1997 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M104 | Avatar | 2009 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
+---------+---------+-------+---------------+---------+------------+------------+-------+
2 rows in set (0.001 sec)

MariaDB [movie]> select * from movie join comments;
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| M101 | Star Wars | 1977 | George Lucas | M104 | R105 | 2020-03-28 | Nice! |
| M101 | Star Wars | 1977 | George Lucas | M102 | R104 | 2020-04-22 | Hello |
| M102 | Titanic | 1997 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
| M102 | Titanic | 1997 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M103 | Snow White | 1937 | NULL | M104 | R105 | 2020-03-28 | Nice! |
| M103 | Snow White | 1937 | NULL | M102 | R104 | 2020-04-22 | Hello |
| M104 | Avatar | 2009 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
| M104 | Avatar | 2009 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | M104 | R105 | 2020-03-28 | Nice! |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | M102 | R104 | 2020-04-22 | Hello |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
10 rows in set (0.000 sec)

MariaDB [movie]> select * from movie inner join comments
-> on movie.movieID = comments.movieID;
+---------+---------+-------+---------------+---------+------------+------------+-------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+---------+-------+---------------+---------+------------+------------+-------+
| M102 | Titanic | 1997 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M104 | Avatar | 2009 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
+---------+---------+-------+---------------+---------+------------+------------+-------+
2 rows in set (0.000 sec)

MariaDB [movie]> select * from movie left join comments
-> on movie.movieID = comments.movieID;
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| M104 | Avatar | 2009 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
| M102 | Titanic | 1997 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M101 | Star Wars | 1977 | George Lucas | NULL | NULL | NULL | NULL |
| M103 | Snow White | 1937 | NULL | NULL | NULL | NULL | NULL |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | NULL | NULL | NULL | NULL |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
5 rows in set (0.000 sec)

MariaDB [movie]> select movie.movieID, movie.title from movie inner join comments
-> on movie.movieID = comments.movieID;
+---------+---------+
| movieID | title |
+---------+---------+
| M102 | Titanic |
| M104 | Avatar |
+---------+---------+
2 rows in set (0.001 sec)

MariaDB [movie]> select * from movie left join comments
-> on movie.movieID = comments.movieID where commemts.movieID is null;
ERROR 1054 (42S22): Unknown column 'commemts.movieID' in 'where clause'
MariaDB [movie]> select * from movie left join comments
-> on movie.movieID = comments.movieID where commemts.movieID is null;
ERROR 1054 (42S22): Unknown column 'commemts.movieID' in 'where clause'
MariaDB [movie]> select * from movie left join comments
-> on movie.movieID = comments.movieID where comments.movieID is null;
+---------+-------------------------+-------+------------------+---------+------------+-------+------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+-------------------------+-------+------------------+---------+------------+-------+------+
| M101 | Star Wars | 1977 | George Lucas | NULL | NULL | NULL | NULL |
| M103 | Snow White | 1937 | NULL | NULL | NULL | NULL | NULL |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | NULL | NULL | NULL | NULL |
+---------+-------------------------+-------+------------------+---------+------------+-------+------+
3 rows in set (0.000 sec)

MariaDB [movie]> select * from movie rating join comments
-> rigth;
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| movieID | title | year1 | director | movieID | reviewerID | vDate | comm |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
| M101 | Star Wars | 1977 | George Lucas | M104 | R105 | 2020-03-28 | Nice! |
| M101 | Star Wars | 1977 | George Lucas | M102 | R104 | 2020-04-22 | Hello |
| M102 | Titanic | 1997 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
| M102 | Titanic | 1997 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M103 | Snow White | 1937 | NULL | M104 | R105 | 2020-03-28 | Nice! |
| M103 | Snow White | 1937 | NULL | M102 | R104 | 2020-04-22 | Hello |
| M104 | Avatar | 2009 | James Cameron | M104 | R105 | 2020-03-28 | Nice! |
| M104 | Avatar | 2009 | James Cameron | M102 | R104 | 2020-04-22 | Hello |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | M104 | R105 | 2020-03-28 | Nice! |
| M105 | Raiders of the Lost Ark | 1981 | Steven Spielberg | M102 | R104 | 2020-04-22 | Hello |
+---------+-------------------------+-------+------------------+---------+------------+------------+-------+
10 rows in set (0.001 sec)

MariaDB [movie]> select * from movie rating
-> on rating.movieID = movie.movieID;
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 'on rating.movieID = movie.movieID' at line 2
MariaDB [movie]> ByeCtrl-C -- exit!


C:xamppmysqlbin>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.