Let Us Learn Oracle - Part 34 of N [ Dump function of Oracle ]
It extracts the column details of the column from the table.
Select
BelongsTo,Dump(BelongsTo) "Dump BelongsTo",
PlayerId,Dump(PlayerId) "Dump PlayerId" ,
DOB,Dump(DOB) "Dump DOB"
From tblPlayers;
/* Result */
BELONGSTO Dump BelongsTo PLAYERID Dump PlayerId DOB Dump DOB
--------- -------------- -------- ------------- ----- ---------
India Typ=1 Len=5: 73,110,100,105,97 1 Typ=2 Len=2: 193,2 12/20/1984 Typ=12 Len=7: 119,184,12,20,1,1,1
India Typ=1 Len=5: 73,110,100,105,97 2 Typ=2 Len=2: 193,3 1/1/1980 Typ=12 Len=7: 119,180,1,1,1,1,1
India Typ=1 Len=5: 73,110,100,105,97 3 Typ=2 Len=2: 193,4 4/21/2000 Typ=12 Len=7: 120,100,4,21,1,1,1
India Typ=1 Len=5: 73,110,100,105,97 4 Typ=2 Len=2: 193,5 11/11/1980 Typ=12 Len=7: 119,180,11,11,1,1,1
India Typ=1 Len=5: 73,110,100,105,97 5 Typ=2 Len=2: 193,6 2/14/1980 Typ=12 Len=7: 119,180,2,14,1,1,1
USA Typ=1 Len=3: 85,83,65 6 Typ=2 Len=2: 193,7 12/20/1971 Typ=12 Len=7: 119,171,12,20,1,1,1
USA Typ=1 Len=3: 85,83,65 7 Typ=2 Len=2: 193,8 1/1/1990 Typ=12 Len=7: 119,190,1,1,1,1,1
USA Typ=1 Len=3: 85,83,65 8 Typ=2 Len=2: 193,9 4/21/1999 Typ=12 Len=7: 119,199,4,21,1,1,1
USA Typ=1 Len=3: 85,83,65 9 Typ=2 Len=2: 193,10 11/11/1988 Typ=12 Len=7: 119,188,11,11,1,1,1
USA Typ=1 Len=3: 85,83,65 10 Typ=2 Len=2: 193,11 2/14/1998 Typ=12 Len=7: 119,198,2,14,1,1,1
India Typ=1 Len=5: 73,110,100,105,97 11 Typ=2 Len=2: 193,12 2/14/1998 Typ=12 Len=7: 119,198,2,14,1,1,1
In the above example, Typ is 1 which indicates that the column is Varchar2.Typ = 2 means it is Numeric while 12 means Datetime
.
Len indicates the length of the value in the column for a particular record. And the values like 73,110,100,105,97 indicates the ASCII code for the value held.
Hope this helps.Thanks for reading.