Oracle default date format DD-MON-RR (14-MAY-11) for English Language Database. DD/MM/YYYY(14/05/2011) for Turkish. You can only subtraction between two dates. The result is day count. ROUND and TRUNC for Date ROUND with ‘MONTH’ => If the day is 16 or more than 16, the date rolls next month and the day makes 1. ROUND with…
Category: Databases
Sysdate in Oracle
Sysdate very important date expression in Oracle. It is very useful date format. Sysdate gives current date. Example select sysdate from dual; Sysdate Functions Sysdate + 1 =>1 day add Sysdate – 1 =>1 day decrease Sysdate + 1/24 =>1 hour add Sysdate + 1/1440 =>1 minute add Current Date : 15-JUN-10 select sysdate+2 from…
External value in SQL
If you want to use external value in SQL, you must use && or & expressions. You can use external value in column name, table name or variable. Example select * from employees where employee_id = &employeeid; If you use to double expression (&&), this value makes a cache. You can use this cached value…