Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| college02_db |
| college_db |
| dbi_college_db |
| employee_db |
| mysql |
| performance_schema |
| student_db |
| sys |
| therapy |
| university_db |
| wpress |
+--------------------+
12 rows in set (0.01 sec)
mysql> create database dbi_college;
Query OK, 1 row affected (0.06 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| college02_db |
| college_db |
| dbi_college |
| dbi_college_db |
| employee_db |
| mysql |
| performance_schema |
| student_db |
| sys |
| therapy |
| university_db |
| wpress |
+--------------------+
13 rows in set (0.00 sec)
mysql> use dbi_college;
Database changed
mysql> create table departments
-> (
-> department_id char(5) primary key,
-> department varchar(20) not null,
-> department_description varchar(100) not null,
-> entry_date date
-> );
Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
-> student_id char(5) primary key,
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> first_name varchar(25) not null,
-> last_name varchar(25) not null,
-> gender char(6) not null,
-> mobile_no char(11),
-> email_no varchar(50),
-> entry_date date
-> );
Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-> course_code char(5) primary key,
-> course varchar(50) not null,
-> course_description varchar(50) not null,
-> course_unit int
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
-> course_reg_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> registration_date date
-> );
Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Enter password:
Welcome to the MySQL monitor. Commands end with' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code
->
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| college02_db |
| college_db |
| dbi_college_db |
| employee_db |
| mysql |
| performance_schema |
| student_db |
| sys |
| therapy |
| university_db |
| wpress |
+--------------------+
12 rows in set (0.01 sec)
mysql> create database dbi_college;
Query OK, 1 row affected (0.06 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| college02_db |
| college_db |
| dbi_college |
| dbi_college_db |
| employee_db |
| mysql |
| performance_schema |
| student_db |
| sys |
| therapy |
| university_db |
| wpress |
+--------------------+
13 rows in set (0.00 sec)
mysql> use dbi_college;
Database changed
mysql> create table departments
-> (
-> department_id char(5) primary key,
-> department varchar(20) not null,
-> department_description varchar(100) not null,
-> entry_date date
-> );
Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
-> student_id char(5) primary key,
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> first_name varchar(25) not null,
-> last_name varchar(25) not null,
-> gender char(6) not null,
-> mobile_no char(11),
-> email_no varchar(50),
-> entry_date date
-> );
Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-> course_code char(5) primary key,
-> course varchar(50) not null,
-> course_description varchar(50) not null,
-> course_unit int
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
-> course_reg_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> registration_date date
-> );
Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> create table exam_scores
-> (
-> exam_score_id char(5) primary key,
-> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> exam_score int,
-> entry_date date
-> );
Query OK, 0 rows affected (0.11 sec)
mysql> Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Enter password:
Welcome to the MySQL monitor. Commands end with' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
'> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
'> -> exam_score int,
'> -> entry_date date
'> -> );
'> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg_id char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
mysql> cre' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql>Enter password:
-> Welcome to the MySQL monitor. Commands end with ; or \g.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql>Enter password:
Welcome to the MySQL' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or' at line 1
-> Your MySQL connection id is 3
-> Server version: 5.7.14 MySQL Community Server (GPL)
->
-> Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
->
-> Oracle is a registered trademark of Oracle Corporation and/or its
-> affiliates. Other names may be trademarks of their respective
-> owners.
->
-> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.
Your MySQL connection id is 3
Server version: 5.7.14 MySQL Community Server (G' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 12 rows in set (0.01 sec)
->
-> mysql> create database dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Query OK, 1 row affected (0.06 sec)
->
-> mysql> show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 1 row affected (0.06 sec)
mysql> show databases' at line 1
mysql> +--------------------+
-> | Database |
-> +--------------------+
-> | information_schema |
-> | college02_db |
-> | college_db |
-> | dbi_college |
-> | dbi_college_db |
-> | employee_db |
-> | mysql |
-> | performance_schema |
-> | student_db |
-> | sys |
-> | therapy |
-> | university_db |
-> | wpress |
-> +--------------------+
-> 13 rows in set (0.00 sec)
->
-> mysql> use dbi_college;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+--------------------+
| Database |
+--------------------+
| informati' at line 1
mysql> Database changed
-> mysql> create table departments
-> -> (
-> -> department_id char(5) primary key,
-> -> department varchar(20) not null,
-> -> department_description varchar(100) not null,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Database changed
mysql> create table departments
-> (
-> department_id c' at line 1
mysql> Query OK, 0 rows affected (0.09 sec)
->
-> mysql> create table students
-> -> (
-> -> student_id char(5) primary key,
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> first_name varchar(25) not null,
-> -> last_name varchar(25) not null,
-> -> gender char(6) not null,
-> -> mobile_no char(11),
-> -> email_no varchar(50),
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.09 sec)
mysql> create table students
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.13 sec)
->
-> mysql> create table courses
-> -> (
-> -> course_code char(5) primary key,
-> -> course varchar(50) not null,
-> -> course_description varchar(50) not null,
-> -> course_unit int
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.13 sec)
mysql> create table courses
-> (
-' at line 1
mysql> Query OK, 0 rows affected (0.11 sec)
->
-> mysql> create table course_reg
-> -> (
-> -> course_reg_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> registration_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.11 sec)
mysql> create table course_reg
-> (
' at line 1
mysql> Query OK, 0 rows affected (0.20 sec)
->
-> mysql> create table exam_scores
-> -> (
-> -> exam_score_id char(5) primary key,
-> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
-> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
-> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code),
-> -> course_reg char(5) not null, index(course_reg_id), foreign key(course_reg_id) references course_reg(course_reg_id),
-> -> exam_score int,
-> -> entry_date date
-> -> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Query OK, 0 rows affected (0.20 sec)
mysql> create table exam_scores
-> (
' at line 1
mysql> ERROR 1072 (42000): Key column 'course_reg_id' doesn't exist in table
'> mysql> create table exam_scores
'> -> (
'> -> exam_score_id char(5) primary key,
'> -> student_id char(5) not null, index(student_id), foreign key(student_id) references students(student_id),
'> -> department_id char(5) not null, index(department_id), foreign key(department_id) references departments(department_id),
'> -> course_code char(5) not null, index(course_code), foreign key(course_code) references courses(course_code
->
No comments:
Post a Comment