Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In SQL-server why functions allow table variables and in the case of stored procedure it allows both table varibles&temporary tables may I know the reason why...


What I have tried:

I can't understand why because, both are temporary results sets but it allows table variables
Posted
Comments
Tomas Takac 15-Aug-18 11:02am    
Not sure if I recall this correctly, but UDF must not change database and temp tables are real tables in tempdb while table variables are just in memory.
CHill60 15-Aug-18 14:00pm    
That would be the correct answer - a virtual 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900