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 sql first day of month

-- First day of month
SELECT TRUNC(sysdate, 'MONTH') from dual;
Comment

oracle sql first day of year

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

oracle sql first day of quarter

-- trunc(date, format)						DUAL is for Oracle
SELECT trunc(sysdate, 'Q') FROM DUAL;       -- 1rst quarter day
SELECT trunc(sysdate) FROM DUAL;            -- today 00:00:00
SELECT trunc(sysdate, 'YEAR') FROM DUAL;    -- 1rst year day
SELECT trunc(sysdate, 'MONTH') FROM DUAL;   -- 1rst month day
Comment

PREVIOUS NEXT
Code Example
Sql :: hw to delete a procedure in pl sql 
Sql :: convert int to varchar sql 
Sql :: oracle sql truncate table 
Sql :: output to file mysql 
Sql :: sql select column names 
Sql :: oracle plan hash value 
Sql :: how to insert string variable into sqlite database 
Sql :: ddl view 
Sql :: postgres get database encoding 
Sql :: display total number of tables in mysql 
Sql :: mysql show tables in database 
Sql :: mysql add 2 hours 
Sql :: helptext in sql 
Sql :: sql last week 
Sql :: oracle stop 
Sql :: oracle update with sequence 
Sql :: drop all database tables oracle sql developer 
Sql :: finding duplicate rows mysql 
Sql :: add timestamp column to existing table t-sql 
Sql :: strict in postgres SQL 
Sql :: sql create table with datetime automatically 
Sql :: query concatenate 
Sql :: reset identity column values in sql server 
Sql :: t sql check column exists 
Sql :: alter table name 
Sql :: How to Add a Default Value to a Column in MS SQL Server 
Sql :: oracle alter table delete column 
Sql :: purge undo tablespace usage 
Sql :: Insert from table tsql 
Sql :: mysql workbench requires visual c++ 2019 redistributable package 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =