MySQL timestamp select date range

后端 未结 7 1083
栀梦
栀梦 2021-02-01 14:32

Not sure really where to start with this one. Can anyone help/point me in the right direction.

I have a timestamp column in MySQL and I want to select a date range for e

7条回答
  •  死守一世寂寞
    2021-02-01 14:52

    This SQL query will extract the data for you. It is easy and fast.

    SELECT *
      FROM table_name
      WHERE extract( YEAR_MONTH from timestamp)="201010";
    

提交回复
热议问题