star keyword oracle [message #656740] |
Mon, 17 October 2016 07:30 |
|
ram_orafaq1989
Messages: 5 Registered: October 2016
|
Junior Member |
|
|
Hi Team,
I was recently asked,what does the star keyword in Oracle does internally .
When i use it as select 5*2 from dual , it gives output as 10 but when i use it as select * from table , it gives the output of the table .
Please tell me how the star keyword is processed by oracle .
|
|
|
Re: star keyword oracle [message #656744 is a reply to message #656740] |
Mon, 17 October 2016 08:23 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Seems like you're answered your own question. If it's between 2 numbers it's assumed to mean multiply, if it's after the select key word then it means all columns. There isn't really anything else that can be said on the subject.
|
|
|
|
Re: star keyword oracle [message #656749 is a reply to message #656740] |
Mon, 17 October 2016 15:06 |
|
EdStevens
Messages: 1376 Registered: September 2013
|
Senior Member |
|
|
Your confusion apparently comes from thinking it is a "keyword" and therefore should behave as such.
No, it is not a keyword. It is just a single character and as you already see, it's usage/interpretation/whatever depends on how/where it is used. Just like a lot of other characters. In a lot of different products.
Think about how many different places you see other special characters that have different usages depending on context.
|
|
|