


The following table list date format models.įull day for ex. Like this “DAY” format model there are many other date format modelsĪvailable in Oracle. To translate a character value, which is in format other than the defaultĭate format, into a date value you can use TO_DATE function with date format to Select to_char(sysdate,’DAY’)”Today” FROM DUAL For example to see the current day you can To translate the date into a different format string you can use To see the current system date and time with fractional seconds with time SELECT SESSIONTIMEZONE, CURRENT_DATE FROM DUAL To see the current system date and time with time zone use CURRENT_DATEĪLTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS' The default setting of NLS_DATE_FORMAT is DD-MON-YY

Then give the give the following statement The format in which the date is displayed depends on NLS_DATE_FORMATįor example set the NLS_DATE_FORMAT to the following formatĪlter session set NLS_DATE_FORMAT=’DD-MON-YYYY HH:MIpm’ To see the current system date and time give the following query. SYSDATE :Returns the current date and time.įunction returns the system date, including fractional seconds and time zone Zone, in a value in the Gregorian calendar of datatype To see the system date and time use the following functions :ĬURRENT_DATE :returns the current date in the session time Integrity Constraints (PRIMARY KEY, NOT NULL.) DEFAULT Values Dropping Constraints Disabling and Enabling Differing Constraints Check View Info about Constraints Working with Dates Oracle Views Oracle Sequences Oracle Synonyms Indexes and Clusters Table Partitioning Altering Partition Tables Dropping Partitions Merging Partitions Splitting Partitions Coalescing Partitions Oracle Objects and Object Types Oracle TO_TIMESTAMP Number Functions (Math Functions) Character Functions Miscellaneous Functions Aggregate Functions Date and Time Functions Oracle Join Queries GROUP BY Queries, SUB Queries CUBE, ROLLUP Functions Oracle DML (INSERT, UPDATE, DELETE.) Oracle DDL (CREATE, ALTER, DROP.) COMMIT, ROLLBACK,SAVEPOINT Data Control Language (GRANT, REVOKE) Oracle SQL Tutorial Contents Introduction to Databases CODD'S Rules Datatypes and Create Table Oracle SELECT Statement Formatting in SQL*Plus UNION, INTERSECT, MINUS Operators and Sorting Query Result 60 Technical Questions 42 Backup & Recovery Questions Unix For Oracle DBA 20 Questions Oracle DBA Interview Questions Most asked Oracle DBA Interview Questions.
