PostgreSQL: Select data with a like on timestamp field
问题 I am trying to select data from a table, using a "like" on date field "date_checked" (timestamp). But I have this error : SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: timestamp without time zone My request is : SELECT my_table.id FROM my_table WHERE my_table.date_checker LIKE '2011-01-%' I don't want to use : SELECT my_table.id FROM my_table WHERE my_table.date_checker >= '2011-01-01 00:00:00' AND my_table.date_checker < '2011-02-01 00:00:00' 回答1: It's all very well