Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to delete a database record after a certain time

DELETE messages WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY);
Comment

PREVIOUS NEXT
Code Example
Sql :: joins vs includes 
Sql :: php mysql set db collation 
Sql :: get all employees if name ends with in sql 
Sql :: dbms interview questions 
Sql :: mysql load data infile default file location 
Sql :: SQL Server log file truncate - Source :NAYCode.com 
Sql :: fill up postgres db 
Sql :: distinct data types in a table sql query 
Sql :: What logs are available on RDS MySQL? 
Sql :: suse start MySQL 
Sql :: mysql table information 
Sql :: subconjuntos SQL 
Sql :: USING THE NOT CONDITION IN SQL 
Sql :: SQL DATEADD(date_part, number, date) 
Sql :: export partttion and import in oracle 
Sql :: nodejs sql get one to many relationship as array 
Sql :: bitmap join index 
Sql :: mysql create schgema 
Sql :: install package for sqlserver in asp.net core 
Sql :: Enable outgoing remote MySQL access 
Sql :: Insert Row Providing Value Explicitly 
Sql :: flask sqlalchemy. commit does not save changes 
Sql :: Select all columns except one in MySQL? 
Sql :: datagrip go to line 
Sql :: mariadb datetime change to microseconds 
Sql :: reading from right to left from string find first special characters in sql 
Sql :: MySQL copy row with * 
Sql :: migration graphql 
Sql :: oracle parse string 
Sql :: postgresql createdb 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =