Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle first day of last year

-- Oracle: First day of previous year
SELECT trunc(add_months(sysdate, -12), 'YEAR') FROM DUAL;
Comment

oracle first and last day of previous month

select add_months(trunc(sysdate,'mm'),-1), last_day(add_months(trunc(sysdate,'mm'),-1)) from dual 
Comment

oracle sql first day of year

-- Oracle: First day of year
SELECT TRUNC(sysdate, 'YEAR') FROM DUAL;
Comment

oracle last day of month

-- Last day of current month
SELECT trim(to_date(last_day(sysdate), 'DD/MM/YYYY')) AS LASTDAY FROM DUAL;
Comment

PREVIOUS NEXT
Code Example
Sql :: restart mysql server ubuntu 
Sql :: oracle stop job 
Sql :: mysql import gzip db 
Sql :: mysql remove unique constraint 
Sql :: stop mysql ubuntu 
Sql :: mysql server start 
Sql :: postgresql reset auto increment 
Sql :: append column sql 
Sql :: t-sql test if table exists 
Sql :: oracle check table space 
Sql :: postgres connection string 
Sql :: how to backup mysql database linux 
Sql :: how to give user privelege to create dblink in oracle 
Sql :: get table column names sql ssms 
Sql :: sql decrement value by 1 if not null or zero 
Sql :: node and mysql like 
Sql :: mysql set root password 
Sql :: check mysql timezone 
Sql :: delete triger pl pg sql 
Sql :: monthname sql 
Sql :: sql remove first character from string 
Sql :: copy sql table 
Sql :: list all tables and columns in postgresql 
Sql :: mysql find non alphanumeric characters 
Sql :: oracle split string 
Sql :: change month to name in sql server 
Sql :: helptext in sql 
Sql :: mysql default port 
Sql :: mysql with rollup 
Sql :: ksql terminate all queries 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =