Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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> create database 2014_10_17;
Query OK, 1 row affected (0.08 sec)
mysql> use 2014_10_17;
Database changed
mysql> create table
-> (
-> ID varchar(8),
-> Department varchar(2),
-> Class 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 '(
ID varchar(8),
Department varchar(2),
Class int
)' at line 2
mysql> create table(ID varchar(8),Department varchar(2),Class 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 '(ID v
archar(8),Department varchar(2),Class int)' at line 1
mysql> clear
mysql> use 2014_10_17;
Database changed
mysql> create table oyutan
-> (
-> ID varchar(8),
-> Department varchar(2),
-> Class int
-> Class 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 'Class
int
)' at line 6
mysql> use 2014_10_17;
Database changed
mysql> create table oyutan
-> (
-> ID varchar(8),
-> Department varchar(2),
-> Class 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 '' at
line 5
mysql> delete table oyutan;
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 'table
oyutan' at line 1
mysql> use 2014_10_17;
Database changed
mysql> create table oyutan
-> (
-> ID varchar(8),
-> Name varchar(35),
-> Department varchar(2),
-> Class int
-> );
Query OK, 0 rows affected (0.50 sec)
mysql> create table hicheel
-> (
-> ID int,
-> Name varchar(30),
-> Credit int
-> );
Query OK, 0 rows affected (0.31 sec)
mysql> create table hicheelsongolt
-> (
-> SID varchar(8),
-> CID int
-> );
Query OK, 0 rows affected (0.41 sec)
mysql> insert into oyutan values('CS11D002','Bat','CS','2');
Query OK, 1 row affected (0.06 sec)
mysql>
No comments:
Post a Comment