oracle
Oracle – Escaping Wild Card Characters with LIKE operator
In Oracle, % (percentage) and _ (underscore) have a special meaning. These two wild card characters are used with LIKE operator: % allows matching any string of any length (including zero length) _ allows matching a single character Example #1 SELECT dname FROM dept WHERE dname LIKE ‘A%’; will return all Department names starting with [...]
Oracle: Breaking Comma Separated String Using DBMS_UTILITY.COMMA_TO_TABLE
There are times one has to break a comma separated string and extract actual values from it. Possible reasons for this requirement could be when a procedure takes an unknown number of strings as an input (although arrays/collections can be used instead, but right now we’ll stick to a single string) or while reading csv [...]
Oracle : Finding User/Database Size
Finding User(s) Size Sometimes one needs to know the space used by a database user. Following query can be used to know the space used by the logged in user in MBs: SELECT sum(bytes)/1024/1024 user_size FROM user_segments; Similarly it is possible to find the space occupied by all the users in a database. [...]
PL/SQL Best Practices with Steven Feuerstein
Schema Cleanup script – Oracle
Working in Oracle, many a times a complete schema cleanup is required due to certain reasons e.g. applying imports from other databases etc. Normally, it is simplest to drop and add the user. This is the preferred method if you have system or sysdba access to the database. But if one doesn’t have these accesses, [...]
