Created
July 24, 2012 14:43
-
-
Save erikbgithub/3170316 to your computer and use it in GitHub Desktop.
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> create table language( | |
-> id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
-> name VARCHAR(1000), | |
-> word VARCHAR(1000), | |
-> lang CHAR(5) | |
-> ); | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> INSERT INTO language VALUES | |
-> (1,'HELLO','hallo','de_DE'), | |
-> (2,'WORLD','welt','de_DE'), | |
-> (3,'HELLO','hello','en_US'), | |
-> (4,'WORLD','world','en_US'), | |
-> (5,'HELLO','hola','es_GT'), | |
-> (6,'WORLD','mundo','es_GT'); | |
Query OK, 6 rows affected (0.02 sec) | |
Records: 6 Duplicates: 0 Warnings: 0 | |
mysql> SELECT * FROM language; | |
+----+-------+-------+-------+ | |
| id | name | word | lang | | |
+----+-------+-------+-------+ | |
| 1 | HELLO | hallo | de_DE | | |
| 2 | WORLD | welt | de_DE | | |
| 3 | HELLO | hello | en_US | | |
| 4 | WORLD | world | en_US | | |
| 5 | HELLO | hola | es_GT | | |
| 6 | WORLD | mundo | es_GT | | |
+----+-------+-------+-------+ | |
6 rows in set (0.00 sec) | |
mysql> SELECT word FROM language WHERE name='HELLO' AND lang='es_GT'; | |
+------+ | |
| word | | |
+------+ | |
| hola | | |
+------+ | |
1 row in set (0.00 sec) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment