- i am new to sql and was following a tutorial from netwrokchunk on youtube.
- if creating a table with first field order, error pops up
- if creating same table with first field orders, doesn't show any error.
mysql> show tables
-> ;
+---------------------+
| Tables_in_nc_coffee |
+---------------------+
| coffee_table |
| orders_table |
+---------------------+
2 rows in set (0.00 sec)
mysql> drop table orders_table;
Query OK, 0 rows affected (0.03 sec)
mysql> show tables
-> ;
+---------------------+
| Tables_in_nc_coffee |
+---------------------+
| coffee_table |
+---------------------+
1 row in set (0.00 sec)
mysql> create table orders_table (
-> order int,
-> coffee int,
-> customer 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 'order int,
coffee int,
customer int
)' at line 2
mysql> create table orders_table ( order int, coffee int, customer 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 'order int, coffee int, customer int )' at line 1
mysql> create table orders_table ( orders int, coffee int, customer int );
Query OK, 0 rows affected (0.03 sec)
mysql>
what is going on here ?