Hi Team,

Is there any specific reason why in the package srdemo_constants you defined constants as a function returning a value instead of defining package constants.

so instead of defining in the package body

function expertiseLevel_apprentice return varchar2 is begin return 'Apprentice'; end;

you could have specified in the package definition

expertiseLevel_apprentice CONSTANT VARCHAR2(10) := 'Apprentice';

saves defining a package body and a lot of typing

asked 14 Feb '14, 04:40

Raymond's gravatar image

Raymond
24319
accept rate: 0%


Hi Raymond,

We do that so that we can use the constants in SQL.

Kind Regards,
Yalim

link

answered 14 Feb '14, 04:44

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

I knew there had to be specific reason. Did not think about that. Good technical point. :-)

link

answered 14 Feb '14, 04:49

Raymond's gravatar image

Raymond
24319
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3
×1
×1

Asked: 14 Feb '14, 04:40

Seen: 962 times

Last updated: 14 Feb '14, 04:49


© Copyright Gerger 2017