mysql> show tables; +--------------------+ | Tables_in_dekhtyar | +--------------------+ | dates | | times | +--------------------+ 2 rows in set (0.01 sec) mysql> CREATE TABLE Wrenches( -> Id INT PRIMARY KEY AUTOINCREMENT, -> Type VARCHAR(12), -> Size FLOAT, -> Units CHAR(5), -> Material VARCHAR(12), -> Manufacturer VARCHAR(12) -> ); 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 'AUTOINCREMENT, Type VARCHAR(12), Size FLOAT, Units CHAR(5), Material VARCHAR(12)' at line 2 mysql> CREATE TABLE Wrenches( Id INT PRIMARY KEY, Type VARCHAR(12), Size FLOAT, Units CHAR(5), Material VARCHAR(12), Manufacturer VARCHAR(12) ); Query OK, 0 rows affected (0.01 sec) mysql> CREATE TABLE Projects ( -> Pid INT AUTO_INCREMENT PRIMARY KEY, -> Name VARCHAR(20), -> Cost FLOAT); Query OK, 0 rows affected (0.01 sec) mysql> CREATE TABLE ToolUse( -> ProjectId INT, -> WrenchId INT, -> PRIMARY KEY(ProjectId, WrenchId), -> FOREIGN KEY (ProjectId) REFERENCES Projects(Pid), -> FOREIGN KEY (WrenchId) REFERENCE Wrenches(Id) -> ); 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 'REFERENCE Wrenches(Id) )' at line 6 mysql> CREATE TABLE ToolUse( ProjectId INT, WrenchId INT, PRIMARY KEY(ProjectId, WrenchId), FOREIGN KEY (ProjectId) REFERENCES Projects(Pid), FOREIGN KEY (WrenchId) REFERENCEs Wrenches(Id) ); Query OK, 0 rows affected (0.01 sec) mysql> create table tmp( -> a int, -> b, 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 ' int)' at line 3 mysql> create table tmp( a int PRIMARY KEY, -> b int PRIMARY KEY); ERROR 1068 (42000): Multiple primary key defined mysql> create table tmp( a int PRIMARY KEY, b int ); Query OK, 0 rows affected (0.00 sec) mysql> create table tmp1( a int PRIMARY KEY, b int UNIQUE ); Query OK, 0 rows affected (0.01 sec) mysql> INSERT INT tmp1 VALUES(1,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 'INT tmp1 VALUES(1,1)' at line 1 mysql> INSERT INTO tmp1 VALUES(1,1); Query OK, 1 row affected (0.01 sec) mysql> INSERT INTO tmp1 VALUES(1,2); ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY' mysql> INSERT INTO tmp1 VALUES(2,1); ERROR 1062 (23000): Duplicate entry '1' for key 'b' mysql> show tables; +--------------------+ | Tables_in_dekhtyar | +--------------------+ | Projects | | ToolUse | | Wrenches | | dates | | times | | tmp | | tmp1 | +--------------------+ 7 rows in set (0.00 sec) mysql> describe Wrenches; +--------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+-----+---------+-------+ | Id | int(11) | NO | PRI | NULL | | | Type | varchar(12) | YES | | NULL | | | Size | float | YES | | NULL | | | Units | char(5) | YES | | NULL | | | Material | varchar(12) | YES | | NULL | | | Manufacturer | varchar(12) | YES | | NULL | | +--------------+-------------+------+-----+---------+-------+ 6 rows in set (0.00 sec) mysql> CREATE TABLE tmp2 ( -> a int auto_inceremnt primary key, -> ) -> ; 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 'auto_inceremnt primary key, )' at line 2 mysql> CREATE TABLE tmp2 ( a int auto_increment primary key,; 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 1 mysql> CREATE TABLE tmp2 ( a int auto_increment primary key, -> b int DEFAULT 10, -> c int NOT NULL); Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO tmp2 VALUES(1,2,3); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO tmp2 VALUES(4,5); ERROR 1136 (21S01): Column count doesn't match value count at row 1 mysql> INSERT INTO tmp2(b,c) VALUES(4,5); Query OK, 1 row affected (0.01 sec) mysql> select * from tmp2; +---+------+---+ | a | b | c | +---+------+---+ | 1 | 2 | 3 | | 2 | 4 | 5 | +---+------+---+ 2 rows in set (0.00 sec) mysql> INSERT INTO tmp2(c,b) VALUES(4,5); Query OK, 1 row affected (0.01 sec) mysql> select * from tmp2; +---+------+---+ | a | b | c | +---+------+---+ | 1 | 2 | 3 | | 2 | 4 | 5 | | 3 | 5 | 4 | +---+------+---+ 3 rows in set (0.00 sec) mysql> INSERT INTO tmp2(a,c,b) VALUES(5,4,5); Query OK, 1 row affected (0.00 sec) mysql> select * from tmp2; +---+------+---+ | a | b | c | +---+------+---+ | 1 | 2 | 3 | | 2 | 4 | 5 | | 3 | 5 | 4 | | 5 | 5 | 4 | +---+------+---+ 4 rows in set (0.01 sec) mysql> INSERT INTO tmp2(c,b) VALUES(6,7); Query OK, 1 row affected (0.00 sec) mysql> select * from tmp2; +---+------+---+ | a | b | c | +---+------+---+ | 1 | 2 | 3 | | 2 | 4 | 5 | | 3 | 5 | 4 | | 5 | 5 | 4 | | 6 | 7 | 6 | +---+------+---+ 5 rows in set (0.00 sec) mysql> DROP TABLE tmp2; Query OK, 0 rows affected (0.00 sec) mysql> select * from tmp2; ERROR 1146 (42S02): Table 'dekhtyar.tmp2' doesn't exist mysql> show tables -> ; +--------------------+ | Tables_in_dekhtyar | +--------------------+ | Projects | | ToolUse | | Wrenches | | dates | | times | | tmp | | tmp1 | +--------------------+ 7 rows in set (0.00 sec) mysql> drop table Projects; ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails mysql> exit