Conversion functions ASCIISTR(s) Returns the ASCII equivalent of all characters in the string s. CAST(expr AS type) Converts the expression expr into datatype type. The expr can be an expression, subquery, or MULTISET clause. See the possible conversion table for standard datatypes. CHARTOROWID(s) Returns the string s as a ROWID datatype. …
Continue reading SQL – Singlerow functions in Oracle (part 4, Conversion Functions)SQL
Date functions ADD_MONTHS(dt, i) Returns the date dt plus i months. If i is a decimal number. Oracle will automatically convert it to an integer by truncating the decimal portion (it may also be negative). EX- ADD_MONTHS(SYSDATE, 2) = ’01-SEP-2003 12:00:03′ CURRENT_DATE Returns the current date in the Gregorian calendar for the session’s …
Continue reading SQL – SinglerowFunctions in Oracle (part 1, Date Functions)Numeric Functions ABS(d) Returns the absolute value of the double d. ACOS(d) Returns the arc cosine of the value d expressed in radians (d should be between -1 and 1). ASIN(d) Returns the arc sine of the value d expressed in radians (d should be between -1 and 1). ATAN(d) Returns the arc tangent …
Continue reading SQL – singlerow functions in Oracle (part – 2, Numeric Functions)Other functions BFILENAME(dir, file) Takes two arguments, where dir is a string containing a directory name and file is a string containing a file name. Returns an empty BFILE locator. When used, the BFILE is instantiated. Neither dir nor file needs to exist at the time the function is called, but both must exist …
Continue reading SQL – singlerow functions in Oracle (part – 3, Other Functions)DDL : Data Definition Language 1.CREATE – to create objects in the database 2.ALTER – alters the structure of the database 3.DROP – delete objects from the database 4.TRUNCATE – remove all records from a table, including all spaces allocated for the records are removed 5.COMMENT – add comments to the data dictionary 6.RENAME – …
Continue reading Types of SQL statements in Oracle