Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql one week ago

SELECT sysdate() - 7; 				-- 1 week ago   12/01/2021 14:27:27
SELECT date(sysdate() - 7); 		-- 1 week ago   12/01/2021 00:00:00

SELECT * FROM my_table WHERE my_datecol > date(sysdate() - 7);
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle substring 
Sql :: create column sql server 
Sql :: strict in postgres SQL 
Sql :: postgres describe query 
Sql :: mysql round 
Sql :: import file mysql terminal 
Sql :: MSSQL SYNTAX PROCEDURE FUNCTION TRIGGER 
Sql :: oracle ora-00054 causes 
Sql :: how to define a composite primary key in sql 
Sql :: postgres power 
Sql :: access mysql command mac xampp 
Sql :: wsl install mysql 
Sql :: where to locate set password for mysql 
Sql :: mysql pretty date format 
Sql :: mysql db size 
Sql :: safe mysql 
Sql :: tsql cmd exec script from file 
Sql :: connecting to mysql database using python 
Sql :: id increment ms sql server 
Sql :: show column from sql server 
Sql :: sql decimal to 2 places 
Sql :: nosql databases list 
Sql :: postgresql left join distinct on 
Sql :: SQL date part only of datetime 
Sql :: sql truncate statement 
Sql :: mysql add column 
Sql :: oracle difference between two dates in seconds 
Sql :: sql count group by 
Sql :: SQL Server - Count number of times a specific character appears in a string 
Sql :: mysql select tables with name like 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =