⌘BABAKOV.NET Let's code!
100% [dark] [ru]
~/databases/oracle $

Oracle

29 total · page 2 / 3

Oracle TO_CHAR (PL/SQL) Function

The TO_CHAR function converts a date or number to a string. Syntax: TO_CHAR(original_value, Format, NLS_LANGUAGE); --The original value can be either a date (DATE) or a number (NUMBER). --The last parameter NLS_LANGUAGE (such as AMERICAN_AMERICA or RUSSIAN_RUSSIA) is used to specify the language for the date and time format. For example, if you want to display the date in Russian, you would use NLS_LANGUAGE = RUSSIAN_RUSSIA.

247 views 0 comments 0 likes ./Read →

Oracle - RANK() and DENSE_RANK() Functions (Or Learning to Choose Necessary Values Within a Multiple Selection)

Let's start with the RANK() function. With explanations for what it is and in what cases it may be useful. The RANK() function is a very useful function that allows us to number a set by some grouping value within the entire selected set. It is easiest to show this with an example. To do this, let's create a small table:

764 views 0 comments 0 likes ./Read →

Oracle Table Size and Tablespace Size

Learn how much each Tablespace occupies: (Size is shown in megabytes) select a.tablespace_name, totalspace, nvl(freespace,0) freespace, (totalspace-nvl(freespace,0)) used, ((totalspace-nvl(freespace,0))/totalspace)*100 "%USED" from (select a.tablespace_name, sum(a.bytes) totalspace, sum(b.bytes) freespace from dba_data_files a, dba_free_space b where a.tablespace_name = b.tablespace_name group by a.tablespace_name)

306 views 0 comments 0 likes ./Read →