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 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 :: DB::transaction 
Sql :: minus vs intersect in sql 
Sql :: uppercase and lowercase in sql 
Sql :: make a field auto_increment mysql 
Sql :: how to alter length character varying postgres 
Sql :: add foreign key constraint in postgresql 
Sql :: datetrunc 
Sql :: psql datetime grather than 
Sql :: sql syntax create timestamp column 
Sql :: how to search date in sql query 
Sql :: delete a record from a table sqlite3 
Sql :: sql add column int nullable 
Sql :: mysql procedures 
Sql :: postgres alter table owner 
Sql :: mssql find deadlocks 
Sql :: mysql sort descending 
Sql :: postgres change column type to uuid 
Sql :: ora-01109 database not open in oracle 19c 
Sql :: SQL Server Get the current identity value of the table 
Sql :: postgres default user 
Sql :: execute mysql file 
Sql :: change date format in oracle query 
Sql :: how to print mysql query of codeigniter query builder 
Sql :: count columns psql(PostreSQL) 
Sql :: convert money to varchar sql server 
Sql :: postgresql find duplicates 
Sql :: database disk image is malformed sqlite fix ubuntu 
Sql :: oracle create table if not exists 
Sql :: run postgres docker 
Sql :: sql count 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =