Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql date minus 1 day

 SELECT SYSDATE();								-- 2021-07-13 06:12
 SELECT DATE_ADD(SYSDATE(), INTERVAL 1 DAY);	-- 2021-07-14 06:12
 SELECT DATE_ADD(SYSDATE(), INTERVAL -1 DAY);	-- 2021-07-12 06:12
 SELECT DATE(SYSDATE());						-- 2021-07-13 00:00
 
 -- ⇓ Test it ⇓ (Fiddle source link)
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle kill session by username 
Sql :: mysql ALTER TABLE ADD COLUMN BOOLEAN AFTER DEFAULT "1"; 
Sql :: postgres add not null to existing column 
Sql :: install mysql on mac 
Sql :: postgresql change column type 
Sql :: mysql update part of string 
Sql :: this is incompatible with sql_mode=only_full_group_by 
Sql :: sql dateadd hours 
Sql :: mysql show indexes on table 
Sql :: sql several or 
Sql :: find table from column name in sql 
Sql :: reset identity column in sql server 
Sql :: mysql where one year ago 
Sql :: The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue. 
Sql :: sql between date range 
Sql :: find a column in all tables postgres 
Sql :: InnoDB: page_cleaner: 1000ms intended loop took 7742ms. The settings might not be optimal 
Sql :: search for tables with name postgresql 
Sql :: select dba users oracle 
Sql :: how to backup mysql database linux 
Sql :: mysql select table names 
Sql :: How to fetch data in between startfromdate to starenddate in sql 
Sql :: having count greater than 1 mysql 
Sql :: sql server convert date to int 
Sql :: ordering by issue with 4 digit numbers in sql 
Sql :: show per page table in xampp 
Sql :: postgres check timezone 
Sql :: oracle nls parameters 
Sql :: sql get table last modified time 
Sql :: sql server for loop 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =