Created
October 5, 2011 16:55
-
-
Save rentalcustard/1264996 to your computer and use it in GitHub Desktop.
WTF mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> desc card_commissions; | |
+------------+--------------+------+-----+---------+----------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+------------+--------------+------+-----+---------+----------------+ | |
| id | int(11) | NO | PRI | NULL | auto_increment | | |
| unique_id | varchar(255) | YES | MUL | NULL | | | |
| year_month | int(11) | YES | | NULL | | | |
| value | decimal(8,2) | YES | | NULL | | | |
| created_at | datetime | YES | | NULL | | | |
| updated_at | datetime | YES | | NULL | | | |
+------------+--------------+------+-----+---------+----------------+ | |
6 rows in set (0.00 sec) | |
mysql> select id from card_commissions limit 1; | |
+----+ | |
| id | | |
+----+ | |
| 1 | | |
+----+ | |
1 row in set (0.00 sec) | |
mysql> select year_month from card_commissions limit 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 'year_month from card_commissions limit 1' at line 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment