Thread: diference between calling a function in select clause and from clause

diference between calling a function in select clause and from clause

From
siva kiran balijepalli
Date:
Hi every body
 
               What i sthe difference between these two sql statements?
 
select * from function-name();
select function-name();
 
The outputs of these will be same but when should we use particular one.
 
please reply
 
 
regards
sivakiran.B
siva kiran balijepalli <b.sivakiran@gmail.com> writes:
>                What i sthe difference between these two sql statements?

> select * from function-name();
> select function-name();

> The outputs of these will be same but when should we use particular one.

If the function returns a set (multiple rows) then the first is
considered better practice.  If not, take your pick.

            regards, tom lane