⌘BABAKOV.NET Let's code!
100% [light] [ru]
~/tags/pl-sql $

#pl/sql

9 posts

9 total

Oracle - Features and Utilities

Useful little things and queries that may be useful with their description. 1. Get a list of all fields of the table that interests us. select column_name from user_tab_columns where upper(table_name) = upper('table_name') 2. Change the default date format in the session. ...

50 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:

763 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)

305 views 0 comments 0 likes ./Read →