P
P
plx496382021-06-05 13:45:09
MySQL
plx49638, 2021-06-05 13:45:09

How to make a selection from MYSQL by interval?

Prompt how to make selection from a DB on an interval.
For example, select all records on the first day of each month at 00 hours 00 minutes 00 seconds

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Slava Rozhnev, 2021-06-05
@rozhnev

The easiest way is to use the LIKE operator:

select * from test where created_at like '%-01 00:00:00';

SQL fiddle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question