Skip to content

Instantly share code, notes, and snippets.

@erikbgithub
Created July 24, 2012 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikbgithub/3170316 to your computer and use it in GitHub Desktop.
Save erikbgithub/3170316 to your computer and use it in GitHub Desktop.
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