0 votes
1 view
in SQL by (20.3k points)

I am looking for a where clause that can be used to retrieve records for the last 24 hours?

1 Answer

0 votes
by (40.4k points)

Try using below code:

SELECT * 

FROM table_name

WHERE table_name.the_date > DATE_SUB(CURDATE(), INTERVAL 1 DAY)

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...