Call by value and call by reference in procedure and function, with NOCOPY.



Call by value and call by reference in procedure and function, with NOCOPY...

Answer / Amit Kumar Chaurasia

In SQL Server, functions and stored procedures can use either call by value or call by reference. However, the concept of pass-by-reference without using NOCOPY is not directly supported in SQL Server.
- Call by Value: When a parameter is passed by value, a copy of the value is created for the function/stored procedure to manipulate. This can be useful for avoiding unintended side effects on the original data.
- Call by Reference (with NOCOPY): In some programming languages like C++, you can use pointers to pass parameters by reference without making a copy of the original data. SQL Server does not support this directly, but you can achieve similar results by using table-valued parameters or output parameters.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What part does database design plays a role in performance of an sql server-based application?

1 Answers  


Does partitioning ssd reduce performance?

1 Answers  


how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration

1 Answers  


When do you create cluster and noncluster index?

5 Answers   Satyam,


List down some advantages of sql stored procedure?

1 Answers  


How to write a query with a right outer join in ms sql server?

1 Answers  


In what sequence sql statement is processed?

1 Answers  


What is the use of for clause?

1 Answers  


What is coalesce and check constraint in sql server?

1 Answers  


Do you know what is similarity and difference between truncate and delete in sql?

1 Answers  


How to run sql server 2005 books online on your local system?

1 Answers  


What is clustered index

0 Answers  


Categories