Created
October 24, 2016 03:16
-
-
Save claudiohilario/0eb9f6b5a0db8502080f4a29245def83 to your computer and use it in GitHub Desktop.
Outras Querys SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Selecionar registo unico aleatório | |
SELECT * FROM table ORDER BY RAND() LIMIT 1 | |
--Remover registos com mais x dias | |
DELETE FROM tabela WHERE date < DATE_SUB(NOW(), INTERVAL X DAY); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment