Functions are computed values and cannot perform permanent environmental changes to SQL Server (i.e. no INSERT or UPDATE statements allowed). A Function can be used inline in SQL Statements if it returns a scalar value or can be joined upon if it returns a result set.
If you like housing metaphors a class is like the blueprint for a house. Using this blueprint, you can build as many houses as you like. each house you build (or instantiate, in OO lingo) is an object , also known as an instance . each house also has an address, of course. If you want to tell someone where the house is, you give them a card with the address written on it. That card is the object's reference . If you want to visit the house, you look at the address written on the card. This is called dereferencing . You can copy that reference as much as you like, but there's just one house -- you're just copying the card that has the address on it, not the house itself. Java methods are always pass-by-value, but the value could be an object's reference. So, if I have: Foo myFoo = new Foo (); // 1 callBar ( myFoo ); // 2 myFoo . doSomething () // 4 void callBar ( Foo foo ) { foo = new Foo (); ...
Comments
Post a Comment