1
返回的結果可以說我有這個表:比較兩列,並在THRID
--------------------------------------------------------------------------
| id | allowed_to_play_pokemon_go_after | last_played_pokemon_go | name |
--------------------------------------------------------------------------
| 1 | 20-JUL-16 | 19-JUL-16 | Jhon |
--------------------------------------------------------------------------
| 2 | 19-JUL-16 | 21-JUL-16 | Bill |
--------------------------------------------------------------------------
現在我想要做一個選擇這樣的:
SELECT name, (last_played_pokemon_go > allowed_to_play_pokemon_go_after) as must_punish
FROM myTable;
其中「must_punish」有bo布爾值(1/0)。
謝謝!正是我想要的:) –