Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where do you stand on variable naming in your application code?

smonMar 17 2011 — edited Mar 17 2011
Just out of curisoity really, I've worked in a number of places over the years and encountered multiple coding styles.

Just thought I'd throw it out there and see what your personal preferences are for variable naming??

I've seen a lot just use v_ for any variable..
v_name 
v_dateofbirth
v_age
Some prefix with the scope instead of just v..
l_localname 
g_globaldate
Then some add the datatype..
lv_localvarchar
ln_localnumber
gb_globalbooelan
And some even use c/java stylee..
vMyName
dDateOfBirth
p for parameters..
p_param1
or i/o
i_in_param
o_out_param
And so on...

Me, I generally just fit in with the 'house style', unless I think it's that bad that it's unusable, but that's been pretty rare.

You?

Edited by: smon on Mar 17, 2011 2:21 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 14 2011
Added on Mar 17 2011
30 comments
1,979 views