Home » SQL & PL/SQL » SQL & PL/SQL » # character is used in column (Oracle 10g)
# character is used in column [message #612105] Sat, 12 April 2014 02:26 Go to next message
sss111ind
Messages: 473
Registered: April 2012
Location: India
Senior Member

Hi All,

when # character is used in column field in oracle.

select * from all_tab_columns where column_name like '%#%';

Regards,
Nathan
Re: # character is used in column [message #612107 is a reply to message #612105] Sat, 12 April 2014 02:38 Go to previous messageGo to next message
Littlefoot
Messages: 19476
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is the question, exactly?
Re: # character is used in column [message #612111 is a reply to message #612107] Sat, 12 April 2014 02:54 Go to previous messageGo to next message
sss111ind
Messages: 473
Registered: April 2012
Location: India
Senior Member


in oracle default table some columns ARE ending with #. any specific reason is there behind that.
Becuase when we create columns then when we can specify that type of column names.
Re: # character is used in column [message #612113 is a reply to message #612111] Sat, 12 April 2014 03:09 Go to previous message
Littlefoot
Messages: 19476
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, # represents a "number", so column named EMP# can be read as "employee number" (or, if you prefer, "employee ID"). Of course, nothing prevents you from putting # anywhere in column name if it means something to you.
SQL> create table testo (col# number, co#lumn number);

Table created.

SQL> select table_name, column_name from user_tab_columns where column_name like '%#%';

TABLE_NAME                     COLUMN_NAME
------------------------------ ------------------------------
TESTO                          COL#
TESTO                          CO#LUMN

SQL> 
Previous Topic: write a oracle query
Next Topic: Outer Join and MAX
Goto Forum:
  


Current Time: Fri Aug 22 09:19:07 CDT 2014

Total time taken to generate the page: 0.09753 seconds