SELECT DATEDIFF(day, date1,date2) AS DateDiff
/*
DATEDIFF accepts three arguments
1- day, month, year etc what form you need difference
2,3- dates
*/
SELECT (END_DATE - START_DATE) Days-Total FROM MyTable
/*this works for oracle sql*/
Code Example |
---|
Sql :: t sql check active deadlock |
Sql :: SELECT NUMBER OF rows for all tables oracle |
Sql :: mysql data types |
Sql :: t sql check column exists |
Sql :: best sql course |
Sql :: désinstaller postgresql linux |
Sql :: sql server format datetime |
Sql :: mysql db size |
Sql :: mysql alter decimal precision |
Sql :: like sql |
Sql :: ora-02391 |
Sql :: hotw to alter lengh character vayng postgres |
Sql :: datetrunc |
Sql :: id increment ms sql server |
Sql :: zsh: command not found: mysql mamp |
Sql :: xml path sql server |
Sql :: grant all privileges mysql |
Sql :: mysql workbench requires visual c++ 2019 redistributable package |
Sql :: allsource oracle |
Sql :: insert value in identity |
Sql :: SQL loop with cursor |
Sql :: order by oracle |
Sql :: To count number of rows in SQL table |
Sql :: mysql how to store lat,lng |
Sql :: psql select unique |
Sql :: mysql else if |
Sql :: SQL Auto Increment Primary Key - SQL Server |
Sql :: print year of a date sql |
Sql :: how to delete user in mysql |
Sql :: savepoint in sql |