CURRENT_DATE returns the current date Example: SELECT CURRENT_DATE as RESULT FROM DUAL; RESULT —————- 05-SEP-05
Trunc – Oracle SQL Function
TRUNC returns the 1st argument truncated by the number of decimal places specified in the 2nd argument. The 2nd argument can be either be a positive integer to specify the right of the decimal point or a negative number to
CURRENT_TIMESTAMP – Oracle SQL Function
CURRENT_TIMESTAMP returns the cyrrent system timestamp. You can also specify an optional precision argument to control the precision of the seconds in the time. Example: SELECT CURRENT_TIMESTAMP AS RESULT FROM DUAL; RESULT ————————– 05-SEP-05 01.24.11.968000 PM -4:00
Ascii – Oracle SQL Function
ASCII returns the decimal representation of the character supplied in the 1st argument. If your database is set to ASCII, then this will be the ASCII code for the character. If your database is set to EBCDIC then it will
DBTIMEZONE – Oracle SQL Function
DBTIMEZONE returns the current database timezone Example: SELECT DBTIMEZONE FROM DUAL; DBTIME ———— +00:00
Chr – Oracle SQL Function
CHR returns the character specified by the code passed in the 1st argument. The returned character depends on the underlying code set that Oracle is using for character data. The argument must be a value that Oracle can implicitly convert
EXTRACT – Oracle SQL Function
EXTRACT allows you to extract parts of a date expression. You may want to extract the year from a date string, or minute value in a date-time expression. Valid extractions include YEAR, MONTH, DAY,HOUR, MINUTE,SECOND,TIMEZONE_HOUR, TIMEZONE_MINUTE, TIMEZONE_REGION and TIMEZONE_ABBR Example:
Concat – Oracle SQL Function
CONCAT returns 1st argument concatenated with 2nd argument. The arguments can be CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB. If the two arguments are of the same data type, then CONCAT returns a string of that type. If they are
FROM_TZ – Oracle SQL Function
FROM_TZ converts a timestamp and time zone value into a TIMESTAMP WITH TIMEZONE value. Syntax: FROM_TZ(timestamp, timezone) Example: SELECT FROM_TZ(TIMESTAMP ‘2004-10-24 06:00:00’, ‘2:00’) as RESULT FROM DUAL; RESULT ————– 24-Oct-04 06.00.00 AM +2:00
Length – Oracle SQL Function
LENGTH returns an integer that is the length of the 1st argument. The 1st argument can be a CHAR, VARCHAR2,NCHAR,NVARCHAR2,CLOB or NCLOB datatype. Example: SELECT LENGTH(‘How long is this?’) as RESULT FROM DUAL; RESULT —————- 17
