I have simple table like this:
+----------+---------------+-------------+
| ID (int) | KEY (varchar) | VALUE (int) |
+----------+---------------+-------------+
| 1 | asdf | 100 |
| 2 | fdsa | 321 |
| 3 | ecda | 211 |
+----------+---------------+-------------+
and I want to update row where KEY = 'something'
but if there is no row where KEY = 'something'
I want to INSERT
new row:
+----------+---------------+-------------+
| ID (int) | KEY (varchar) | VALUE (int) |
+----------+---------------+-------------+
| 1 | asdf | 100 |
| 2 | fdsa | 321 |
| 3 | ecda | 211 |
| 4 | something | 200 |
+----------+---------------+-------------+
Is it possible in only one query?