Timeline for How to declare reserved words as variables in Oracle PL/SQL?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 5, 2016 at 8:15 | comment | added | BriteSponge | To add to that - DON'T DO IT. Its just not worth it. I've turned up at client sites to find that users insisted on certain names for table columns that included reserved words as well as 'non-standard' characters, e.g. '-'. I see it as a lack of consideration for anyone running or debugging code later. | |
May 5, 2016 at 0:47 | comment | added | Vérace |
begin number; will make your app non-portable and your debugging difficult. Anyone who uses reserved words in PL/SQL (or anywhere) should be committed :-) You have IIRC 30 whole characters per identifier - the manual says you can quote reserved words, but this is not recommended .
|
|
May 4, 2016 at 21:05 | comment | added | Joishi Bodio |
Would upvote 20 times if I could - there should really be no reason to ever use a reserved word as a variable/column name. If you are using a reserved word, chances are your variable/column name isn't descriptive enough. With a variable it's easy to have a prepend on it (my_timestamp as an example).
|
|
May 4, 2016 at 17:05 | vote | accept | alexanderjsingleton | ||
May 4, 2016 at 17:03 | comment | added | alexanderjsingleton | that's strange because my Oracle SQL Developer output window was treating it as an error; I re-ran my script in my question and now it passes. In any case, I was looking for the appropriate bypass with quotes as you suggested-thank you! | |
May 4, 2016 at 17:00 | history | answered | Balazs Papp | CC BY-SA 3.0 |