Like with & in SQL Script -


in sql script have inherited, there following line, partially not understand.

where substr(hou.name,1,2) '&region%' 

i understand substr function, not understand &region in clause.

can me make sense of it?

basically take variable has been defined elsewhere , substitutes statement. assuming using oracle, can user input front using

accept region prompt 'enter region searched: ' 

or can use define statement hard code it. either way, once variable defined can use typing &region. if types in "south" example, compiler see equivalent to

where substr(hou.name,1,2) 'south%' 

and give results south carolina, south dakota, etc.


Comments