are we able to use remove or update command in the function in sql server 2005 database or other database?

By trying and employ an UPDATE in the function you will get:

Server: Msg 443, Level nn, State 1, Procedure function_Name, Line nn
Invalid use of 'UPDATE' within a function.

To avert this error from happening, make certain that you simply don’t make use of an UPDATE statement in the user-defined function unless of course it’s upgrading a nearby table variable. If you will need to make use of the UPDATE statement on the table, make use of a saved procedure rather than a person-defined function for this function.

Create Function

No you can't use any DML claims (Place, UPDATE, and Remove) on base tables. One other issue having a UDF is the fact that SQL functions coming back non-deterministic values aren't permitted to become known as from the inside an UDF. Although UDFs get their own advantages they may be utilized in a Choose, Where, or Situation statement. May be used in joins.