Search
 
SCRIPT & CODE EXAMPLE
 

SQL

add days in oracle sql

SELECT sysdate + 1 FROM dual; 				-- Tomorrow    12/01/2021 14:27:27
SELECT trunc(sysdate) + 1 FROM dual; 		-- Tomorrow    12/01/2021 00:00:00
SELECT sysdate + INTERVAL '20' DAY FROM DUAL;		-- 20 days ahead (other way)
SELECT sysdate + 1 / 24 FROM dual;					-- 1 hour ahead
SELECT sysdate + 1 / 24 / 60 FROM dual;				-- 1 minute ahead
SELECT add_months(trunc(sysdate), 1) FROM dual;   	-- 1 month ahead (no time)
SELECT trunc(sysdate) + 30 FROM dual;				-- 30 days ahead (no time)
SELECT add_months(trunc(sysdate), +12*2) FROM dual;	-- 2 years ahead (no time)
Comment

PREVIOUS NEXT
Code Example
Sql :: start mysql server using docker 
Sql :: select count from table mysql 
Sql :: mysql default port 
Sql :: select from array in psql 
Sql :: show tables in schema oracle 
Sql :: postgresql CREATE EXTENSION pgcrypto 
Sql :: replace null with 0 in sql 
Sql :: set auto increment to 1 mysql 
Sql :: postgres list tables and row counts 
Sql :: get last record in sql 
Sql :: get first 2 letter in sql 
Sql :: python mysql search 
Sql :: sql alter table statement 
Sql :: sysdate in sql 
Sql :: how to select all attributes from a row if there is a certain string in it MySQL 
Sql :: alter table oracle 
Sql :: oracle asynchronous update 
Sql :: mysql safe mode 
Sql :: sql select divide column by number 
Sql :: how to get mysql db size 
Sql :: like sql 
Sql :: sql update table based on another table 
Sql :: psql datetime grather than 
Sql :: simple project for database 
Sql :: show data in table postgres 
Sql :: ubuntu mysql cannot connect to database server remote 
Sql :: mysql sort descending 
Sql :: postgresql search object in array 
Sql :: add column with foreign key constraint sql server 
Sql :: mssql disable foreign key constraint 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =